[Asio] Multiple Servers using io_service

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello everyone, i am trying to create a program where two servers accept incoming tcp connections, each at a different port. I worked through the tutorials and the used async_accept as described there to listen for connections. For a single server that worked fine. For the second server i postponed calling io_service.run() until both async_accept operations were executed. Both Instances use the same io_service. But now neither port is opened when i start the program. No exceptions, nothing. I realize that i am new to using boost and that this may be a stupid question, but still, it is a puzzling error to me and time is somewhat of the essence here, so if you could please give me a hint on how to proceed, i would greatly appreciate it. Thanks in advance, Dominik Steenken -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIyYVKaIgTXFmz1t0RAgzKAJ9gvNcQl5+TVuiQJv8qQA+cGubeTgCeMEQo yZV1pq14n481VkdomJUgwAE= =UpHz -----END PGP SIGNATURE-----

For a single server that worked fine. For the second server i postponed calling io_service.run() until both async_accept operations were executed. Both Instances use the same io_service.
You have to run io_service, in order to get async. operations processed. Can you please post a code snippet to make the things more clear?
participants (2)
-
Dominik Steenken
-
Igor R