Boost logo

Boost Users :

From: Cory Nelson (phrosty_at_[hidden])
Date: 2008-06-24 09:41:35


On Tue, Jun 24, 2008 at 1:35 AM, Ian O'Connell <ianoc_at_[hidden]> wrote:
> Hello
>
> I was wonder if its possible to create synchronous behaviour regarding
> a connection attempt, i.e.
>
> Upper library layer calls : connect to host and waits for the connection
> to succeed or time out.
> asio can create the async connection attempt and timer and then run the
> ioservice to 'wait' on the async calls.
>
> which is fine in a simple senario where there are no other async calls
> running, ideally i'd like to be able to bring up a connection in a
> synchronous manner and then introduce the socket into an io_service
> which is processed by a pool of threads.
>
> Is it possible to either change the io_service a tcp socket uses, or
> retrieve the native type in a tcp socket and release the objects
> ownership of the type and assign this to a new object which uses the
> other io_service?
>
> i.e. Thread local io_service for setup
> library io_service which is processed by threadpool
>

I can't speak for other platforms but at least on Windows this is
impossible with the API that asio uses.

-- 
Cory Nelson

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