Safe WebSocket stop

44 views
Skip to first unread message

Сергей Потапенко

unread,
Apr 6, 2023, 9:00:38 AM4/6/23
to WebSocket++
Hello everyone!
Is anyone has working code for safe WebSocket stop?
I read explanation of this in FAQ ("How do I cleanly exit an Asio transport based program"), but I need working code..
In FAQ explanation I don't understand, for what object I must call "close" (after call server.stop_listening() ).
Best regards. Potapenko Sergey.

leep

unread,
May 17, 2023, 6:37:48 PM5/17/23
to WebSocket++
woulfn't you just run m_endpoint.close(). You may have to save the m_endpoint object to a global variable first, depending on how/where you wish to close it from.
Reply all
Reply to author
Forward
0 new messages