Hi,
you can read LastError and compare with WSAETIMEDOUT or other (in sswin32.pas
or sslinux.pas).
You can know if port is open with WSAECONNREFUSED (or WSAEADDRNOTAVAIL if ip
address not found)
regards
Emeric
--- En date de : Mer 27.1.10, Jeremy Coulter <[email protected]> a écrit :
De: Jeremy Coulter <[email protected]>
Objet: [Synalist] FW: Best way to do this
À: [email protected]
Date: Mercredi 27 Janvier 2010, 20h01
HI All.
I have written a simple TCP client thats running in a
thread.
I want to know what the best way of detecting if the server
is not present is.
I am doing a “repeat until” to read the received data
from the socket. I was looking at the “lasterror” after it does a “socket.
RecvString(1000);” but the last error could be timedout which it is, it timed
out reading the buffer.
However, I really want to “monitor” if the connection is
open or closed.
I was looking at the OnStatus event, but the error in that
is also timedout from the above.
Can anyone suggest a good method/practice to monitor the
connecton?
Thanks, Jeremy
-----La pièce jointe associée suit-----
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-----La pièce jointe associée suit-----
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public