Heart beat function for client Server communication

bridged with qnx.development_tools
Post Reply
nikhilwalker

Heart beat function for client Server communication

Post by nikhilwalker » Fri May 20, 2005 7:52 am

Hi All.

i am new to socket programming and to QNX.

My problem is to have some sort of heartbeat function for the server
and the client.

So that after specified time the heartbeat fuction should send some
data to the server (may be using OOB) and then shoul wait for the
reply.

If the reply is obtained in the specified tiime they client should
contnue, otherwise it sould close the connect..

Can I get the source code fro this


Nikhil

Robert Kindred

Re: Heart beat function for client Server communication

Post by Robert Kindred » Fri May 20, 2005 2:42 pm

I'm not sure exactly why you want this behavior, but maybe what you want is
just to enable keepalives at the socket level. If you put this heartbeat
into your own code, then you will have trouble debugging it, because anytime
you stop at a breakpoint longer than the heartbeat time, the other end will
disconnect you. Check out setsockopt.


"nikhilwalker" <nikhilwalker@yahoo-dot-com.no-spam.invalid> wrote in message
news:d6k4vb$9tl$1@inn.qnx.com...
Hi All.

i am new to socket programming and to QNX.

My problem is to have some sort of heartbeat function for the server
and the client.

So that after specified time the heartbeat fuction should send some
data to the server (may be using OOB) and then shoul wait for the
reply.

If the reply is obtained in the specified tiime they client should
contnue, otherwise it sould close the connect..

Can I get the source code fro this


Nikhil

Post Reply

Return to “qnx.development_tools”