request and was updated to contain a handshake response. false if not.
websocketServerProcessHandshake
fn
bool websocketServerProcessHandshake(soup.server_message.ServerMessage msg, string expectedOrigin, string[] protocols, gobject.type_class.TypeClass[] supportedExtensions, out soup.websocket_extension.WebsocketExtension[] acceptedExtensions)Examines the method and request headers in msg and (assuming msg contains a valid handshake request), fills in the handshake response.
If expected_origin is non-null, then only requests containing a matching "Origin" header will be accepted. If protocols is non-null, then only requests containing a compatible "Sec-WebSocket-Protocols" header will be accepted. If supported_extensions is non-null, then only requests containing valid supported extensions in "Sec-WebSocket-Extensions" header will be accepted. The accepted extensions will be returned in accepted_extensions parameter if non-null.
This is a low-level function; if you use [soup.server.Server.addWebsocketHandler] to handle accepting WebSocket connections, it will call this for you.
Parameters
msg | #SoupServerMessage containing the client side of a WebSocket handshake |
expectedOrigin | expected Origin header |
protocols | allowed WebSocket protocols. |
supportedExtensions | list of supported extension types |
acceptedExtensions | a #GList of #SoupWebsocketExtension objects |
Returns
true if msg contained a valid WebSocket handshake