|
Boost : |
Subject: [boost] [Asio] Starting/stopping chat_server externally
From: Tres Spicher (tres_at_[hidden])
Date: 2009-03-09 17:32:46
Hi all,
I am hoping someone who is an expert on Boost.Asio can help me by
analyzing my modifications to the chat_server example. I have adjusted
the example to closely resemble an application I am developing that
uses the example as its inspiration. Important differences between my
version and the official version include:
1) chat_room supports clearing the set of participants, and the
destructor for participants closes the corresponding socket
2) chat_server supports a start and a stop operation from another thread
3) The io_service is managed by the chat_server object instead of the
main function
I would like to know if my usage is correct, particularly for the
start/stop operations. I would like the stop operation to put the
chat_server into the same state it was in on construction, so that the
start operation semantics are identical whether the chat_server is
newly constructed or has already been stopped. I am concerned about
memory leaks or uncaught exceptions, and anything else that a seasoned
user of the library would notice that I may have missed.
The code can be found here:
http://pastie.org/412088
Thanks in advance!
Tres
-- Tres Spicher Boulder Labs tres_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk