
3 Nov
2010
3 Nov
'10
5:40 p.m.
I have one thread how runs io_service. I have 2 servers (tcp) ports with all corresponded acceptor and bunch of sockets connected to both ports.
I am looking into the way to stop just one server but still run the other one. I have implemented a "hard" way to stop server: remove acceptor, cancel/close sockets, that will trigger all read/write asynchronous callbacks, wait till they all done.
It seems to be the coorect way, but why do you have to wait? Can't you just close sockets/acceptors and forget about them?