|
Boost Users : |
Subject: Re: [Boost-users] boost::asio::tcp -> asyncconnect generates multiple sockets
From: Michael Lindner (mplmpl_at_[hidden])
Date: 2011-07-07 13:41:12
A TCP connection has two ends. Since you are connecting to localhost, both
the client side and server side socket are on the same machine. If you were
connecting to a remote host one socket would have been created on the client
machine and the other on the server machine.
HTH,
Mike
On Wed, Jul 6, 2011 at 2:58 AM, Hert <gert_corthout_at_[hidden]> wrote:
> hello,
>
>
> I noticed that when asynchronously connecting to an acceptor on localhost
> using boost::asio::ip::tcp::socket generates 2 TCP sockets on the system.
> One to the acceptor and one to the other one. Stepping into the code I can
> see where it is done, but I don't understand why. So why is this extra TCP
> socket there?
>
> thanks in advance,
> Gert
>
> --
> View this message in context:
> http://boost.2283326.n4.nabble.com/boost-asio-tcp-asyncconnect-generates-multiple-sockets-tp3647856p3647856.html
> Sent from the Boost - Users mailing list archive at Nabble.com.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net