Boost logo

Boost :

Subject: [boost] [asio] Received 3 times RST, ACK before the boost TCP returns connection failure
From: allen han (allenhan2_at_[hidden])
Date: 2009-02-18 08:26:40


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?

      


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk