[fpc-pascal] How to detect connection status of a socket

Xiangrong Fang xrfang at gmail.com
Mon Apr 22 15:10:48 CEST 2013


2013/4/22 Michael Schnell <mschnell at lumino.de>

> As long as no event happens to one of the sites, the socket is esteemed
> connected by this site. This does not mean that the other site thinks the
> same
>

OK, as connection status is a complex issue, I try to put it in another
way:

1) fpsend() just pass data to the OS's socket layer without try to
determine if the connection is still alive, right?

2) is it normal that in BLOCK mode, recv returns 0?  i.e. if I receive a 0
from fprecv(), I can say that the connection is closed by the other end (if
there is no detectable socketerror), right?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130422/f1de9563/attachment.html>


More information about the fpc-pascal mailing list