Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Asio] asio objects: initializing after construction
From: Boris (boriss_at_[hidden])
Date: 2008-10-12 09:06:00

On Sat, 11 Oct 2008 12:11:42 +0200, Roman Shmelev <rshmelev_at_[hidden]>

> Hi!
> Lets assume I have some kind of map :
> map<int, boost::asio::ip::tcp::acceptor> my_acceptors;
> AND map<int, boost::asio::ip::tcp::socket> my_sockets;
> I want to extend the maps with new objects, so what is the right way to
> (?):
> my_acceptors[someport_int].initialize(_my_ioservice,_my_endpoint);
> my_acceptors[another_int].initialize(_my_ioservice);

I had a similar question as I wondered how to pass a reference to an
io_service to an I/O object after is has been created (see As far as I
see there is no way to do this (no recommendation or guideline in
Boost.Asio either as all I/O objects always seem to be initialized with an


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at