16 May
2007
16 May
'07
2:15 p.m.
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