CAsyncSocket and dead sockets 
Author Message
 CAsyncSocket and dead sockets

Suppose I have a simple client-server relationship between
remote systems communicating via a socket connection.  By
what means would the client or server detect if the other
has explicitly terminated the connection or is no longer
responding?  The idea will be to allow the client and
server to automatically re-connect in the case of a
temporary network outage, unexpected failure of one, or
explicit restart of one.


Fri, 19 Aug 2005 23:48:09 GMT  
 CAsyncSocket and dead sockets
If a peer closes the other one gets a OnClose event.
If the network pull the plug, it will time out , you'll get a OnClose with
an error message.
TCP chats away down below, so you dont have to poll.

Have a look at this little app, I use it because theres actually a hell of a
lot more to TCP comms than I thought http://www.geocities.com/coshunt/


Quote:
> Suppose I have a simple client-server relationship between
> remote systems communicating via a socket connection.  By
> what means would the client or server detect if the other
> has explicitly terminated the connection or is no longer
> responding?  The idea will be to allow the client and
> server to automatically re-connect in the case of a
> temporary network outage, unexpected failure of one, or
> explicit restart of one.



Sat, 20 Aug 2005 03:35:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Dead sockets in Solaris?

2. CAsyncSocket vs standard socket library

3. CAsyncSocket::OnReceive still gets called after closing the socket on system overload

4. CAsyncSocket(MFC Socket) vs Winsock api(help me...please)

5. CAsyncSocket(MFC Socket) vs Winsock api(help me...please)

6. CAsyncSocket(MFC Socket) vs Winsock api(help me...please)

7. CAsyncSocket(MFC Socket) vs Winsock api(help me...please)

8. Advantages between SOCKET and CAsyncSocket

9. CAsyncSocket(MFC Socket) vs Winsock api(help me...please)

10. CAsyncSocket(MFC Socket) vs Winsock api(help me...please)

11. CAsyncSocket(MFC Socket) vs Winsock api(help me...please)

12. Server sockets using CAsyncSocket

 

 
Powered by phpBB® Forum Software