Boost logo

Boost Users :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2007-05-16 10:15:51


Sohail Somani writes:
> What I had thought of was spawning two threads for the two services. My
> questions are:
>
> * Is it possible to use streams with concurrent connections?

Yep.

> * Would asio be unhappy if I used the above "design"?

There is no shared data between distinct tcp::iostream objects, so there should
be no problem.

> * Is there a better suggestion/example I can look at?

My only question for you is how many concurrent connections do you expect to
have? Just one at a time for each of the services, with each service using an
iterative server design? If you might have more than one concurrent connection
per service then you're going to need more than two threads.

Cheers,
Chris


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