[fpc-pascal] How to detect connection status of a socket
xrfang at gmail.com
Mon Apr 22 14:23:30 CEST 2013
I am writing a redis client in fpc and found that even when the connection
is closed by server (via redis CLIENT KILL), send and receive can still be
done without error. i.e.:
- fpsend returns the number of bytes sent
- fprecv returns 0 (but NOT -1, which indicate a "detectable" error, as per
I also checked socketerror after send/recv, no error is reported.
How do I tell if a socket is still connected or not?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal