Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Removing server socket from service
From: Sakharuk, Vladimir (vladimir.sakharuk_at_[hidden])
Date: 2010-11-03 13:48:33


Yes I tried that.
But at my code async operations got triggered with errors from io_service thread and the acceptor objects was destroyed already.

Please follow the attached hyperlink to an important disclosure:
http://www.credit-suisse.com/legal/marketcommentary

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Igor R
Sent: Wednesday, November 03, 2010 1:40 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [asio] Removing server socket from service

> 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?
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

===============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===============================================================================


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