Converting a TcpConn to a websocket connection #24177
Unanswered
ImmanuelSamuel
asked this question in
Questions and Answers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How can we convert existing TcpConn to websocket using the net.websocket library. It has a handle_websocket function on the Server struct. So essentially is there a way to use existing code to implement the onmessage, onconnect, onclose handlers instead of doing it from scratch.
the above seems to get message text-frame -> read: text -> sending on_message events
But the on_message handler in the code above is not reached - I do not see a on_connect event either.
Beta Was this translation helpful? Give feedback.
All reactions