WebSocketUpgrade
An OutgoingContent response object that could be used to respond()
: it will cause application engine to perform HTTP upgrade and start websocket RAW session.
Please note that you generally shouldn't use this object directly but use WebSockets feature with routing builders webSocket instead.
handle function is applied to a session and as far as it is a RAW session, you should handle all low-level frames yourself and deal with ping/pongs, timeouts, close frames, frame fragmentation and so on.
Parameters
that is starting web socket session
web socket negotiated protocol name (optional)
specifies if WebSocket extensions should be installed in current session.
function that is started once HTTP upgrade complete and the session will end once this function exit
Constructors
An OutgoingContent response object that could be used to respond()
: it will cause application engine to perform HTTP upgrade and start websocket RAW session.