Closed ahao1995 closed 3 weeks ago
Have you set a timeout on the stream? https://www.boost.org/doc/libs/1_85_0/libs/beast/doc/html/beast/using_websocket/timeouts.html
Have you set a timeout on the stream? https://www.boost.org/doc/libs/1_85_0/libs/beast/doc/html/beast/using_websocket/timeouts.html
I do not use timeout, I want to close it quickly and reconnect, just like force close not graceful, is there some method?
beast::get_lowest_layer(*ws_stream_).close();
will do it, or you can simply ignore the stream object and let it be destroyed.
beast::get_lowest_layer(*ws_stream_).close();
will do it, or you can simply ignore the stream object and let it be destroyed.
you mean direct use ws_stream_.emplace(exec_, ctx_);
let it destroy?
Yes, that would have the same effect as closing the underlying socket.
I use
async_close
to close the socket, but after 5min recv callback, have any method to force close the connection, and not wait the close frame may be I should callafter that I want to do reconnect
it is right? thanks