No network packets sent immediately after quick physical disconnect and reconnect.

Posted by Hans on Stack Overflow See other posts from Stack Overflow or by Hans
Published on 2010-04-09T16:50:09Z Indexed on 2010/04/09 16:53 UTC
Read the original article Hit count: 308

Filed under:
|
|

I am using Boost's ASIO libraries to establish a UDP connection to a remote server. To make sure the connection is active, every second a keep-alive message is sent to the server.

I have noticed that if I unplug the network cable and reinsert it quickly, the first 2 or 3 keep-alive messages after the reinsert are never sent. I tested this by running wire-shark on the server. I have seen it take up to 5 seconds before the client starts sending out network traffic again.

The client is running under Linux (2.6.2), if that helps.

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost-asio