Closed kylegranger closed 1 year ago
Hi,
I've never thought about it which means sending a notification from the server is not supported. I'd have to spend some time to check if we can even access the session from a handler, then adding support for bidirectional rpc is yet another task...
Ah, ok, understood. Something like this then is clearly not supported at the present time.
As an alternative, we'll just be using then a full-duplex boost::asio websocket server, and implement the JSON-RPC processing on top of it ourselves. (It's a requirement that we use the main boost io_context.) Thank you for your response!
Hi! I'm working with your library, and I'm trying to figure out how to get the session (or socket) from within a handler. We'd like to send back notifications on the same websocket; the server may have several users connected.
The only example code I saw related to this, was capturing a session_ptr when adding the handler (from basic_test_server_crash.cpp)
But, I'm not sure something like that would work with more than one connection. I could capture the server itself, but I don't know how to go about finding the socket in the handler.
Thank you for any hints here!
Kyle