Thanks for your answer.
It is a probably a good way to know if a connection is dead. But what about
the situation when the client didn't send any data for a certain period of
time, but it is still connected and alive? Receive() will return zero bytes.
Etienne
> > Hi there,
> > I'm playing with Socket and Telnet (via hyperterminal). I'm trying to
[quoted text clipped - 10 lines]
> hth,
> Max
Markus Stoeger - 22 Jul 2005 22:35 GMT
> It is a probably a good way to know if a connection is dead. But what
> about the situation when the client didn't send any data for a certain
> period of time, but it is still connected and alive? Receive() will return
> zero bytes.
If you are using blocking sockets, Receive will not return 0 bytes unless
the client disconnected. If you call Receive but there is no data
available, Receive will block and wait until there is data available or
until the client disconnects (in which case it would return 0 bytes).
Max