Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Asio SSL can't receive without sending
From: Richard Hodges (hodges.r_at_[hidden])
Date: 2016-08-22 09:52:13


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, 刘焕杰 <jenenliu_at_[hidden]> wrote:

> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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