A. did you forget to have an async_read_some active?
B. did your io_service stop because you forgot to give it
asio::io_service::work?
C. did you call shutdown() or close() on the underlying protocol?
D. What is the exact error_code.value(), .category() and .message()?
once io_service::run() returns, the io_service will be in the stopped()
state. This happens when there are no remaining async operations waiting to
complete on it. In a multi-threaded environment you must keep the
io_service running by creating an io_service::work object against it. Then
when you want to stop your communications loop, you would call
op_service::stop() and join the threads.
Can you post a minimal complete example somewhere which demonstrates the
problem?
R
On 19 August 2016 at 08:57, 刘焕杰
Hi, I am using Boost Asio to developed a server, with SSL support. I add async_read_some() function in handshake handler and send handler. Which receiving is OK if I send something to clients, but I can't keep receiving after I stop sending things to client. So I am wondering how can I keep receiving, I know there must be a way to make it, I am new to Asio, can someone help, thanks in advance.
------------------ I won't go
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users