Boost logo

Boost :

Subject: [boost] [ASIO] tcp::socket::async_connect() connections count
From: Jim Xochellis (dpxguard-boost_at_[hidden])
Date: 2011-10-13 10:08:11

Hi list,

I am testing a slightly modified version of the chat_client/chat_server ASIO
examples and I have noticed that, immediately after the
tcp::socket::async_connect() call from inside the chat_client constructor,
the client is creating and establishing not one, but three TCP connections,
only one of which is targeting to the server-port. Furthermore, calling
repeatedly the async_connect() seems to constantly create three connections
per call. I have also noticed that other programs in my system, which also
communicate via TCP (ie the hyper-terminal), only open one connection at the
client side.

Is this async_connect() behavior, which I have mentioned above, the
expected/natural behavior, or maybe I am doing something wrong?
If this behavior is expected, is there a reason for it? Do I have a choice
to change it?

Please note that there is a near-4000 outbound concurrent connections
default limit in many Windows-XP installations, hence this question has a
practical meaning.

Configuration informations:

OS: Windows XP Pro SP3
Boost version: 1.46.1
IDE: MVS 2005

Thank you in advance,
Jim Xochellis


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at