How do i check client information as user-agent from boost async web socket server ?
I have checked: https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/server/async/websocket_server_async.cpp
It was my only referance.
How do i check client information as user-agent from boost async web socket server ?
I have checked: https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/server/async/websocket_server_async.cpp
It was my only referance.
Instead of the
async_accepton the websocket here:You could read a HTTP request instead and call the third overload instead:
And then outside
on_run():This gives you the opportunity to do stuff inside
on_upgradethat inspects the upgrade request:Indeed using wscat as client:
Causes our Beast server to print out: