Heart beat function for client Server communication

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

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