[asio] Received 3 times RST, ACK before the boost TCP returns connection failure

Hi: Pretty new to use the boost library for networking and experienced a problem to use the TCP socket on client side. 1. using the call below to connect server: mSocket.async_connect(endpoint,boost::bind(&handleConnect, this, boost::asio::placeholders::error, ++aEndPointIterator)); 2. found connection is failed, then close the socket void handleConnect(const boost::system::error_code &aErr, boost::asio::ip::tcp::resolver::iterator aEndPointIter) { if (!aErr) { ... } else if (aEndPointIter != boost::asio::ip::tcp::resolver::iterator()) { doClose(); ... } else { ... doClose(); } } 3. From Ethereal, found that SYN, RST/ACK have been sent 3 times before the connection is closed, Client sent Server SYN, Server sent Clinet RST, ACK Client sent Server SYN, Server sent Clinet RST, ACK Client sent Server SYN, Server sent Clinet RST, ACK Question: Any flag to inform the boost TCP stack to return error if it receives the first RST,ACK?

That might be the nature of TCP, itself? On Wed, Feb 18, 2009 at 5:26 AM, allen han <allenhan2@yahoo.com> wrote:
Hi: Pretty new to use the boost library for networking and experienced a problem to use the TCP socket on client side.
1. using the call below to connect server: mSocket.async_connect(endpoint,boost::bind(&handleConnect, this, boost::asio::placeholders::error, ++aEndPointIterator));
2. found connection is failed, then close the socket void handleConnect(const boost::system::error_code &aErr, boost::asio::ip::tcp::resolver::iterator aEndPointIter) { if (!aErr) { ... } else if (aEndPointIter != boost::asio::ip::tcp::resolver::iterator()) { doClose(); ... } else { ... doClose(); } }
3. From Ethereal, found that SYN, RST/ACK have been sent 3 times before the connection is closed, Client sent Server SYN, Server sent Clinet RST, ACK Client sent Server SYN, Server sent Clinet RST, ACK Client sent Server SYN, Server sent Clinet RST, ACK
Question: Any flag to inform the boost TCP stack to return error if it receives the first RST,ACK?
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
allen han
-
Gregory Dai