Module lightws::handshake::response

source ·
Expand description

Server upgrade response.

From RFC-6455 Section 4.2:

When a client starts a WebSocket connection, it sends its part of the opening handshake. The server must parse at least part of this handshake in order to obtain the necessary information to generate the server part of the handshake.

If the server chooses to accept the incoming connection, it MUST reply with a valid HTTP response.

Example:

HTTP/1.1 101 Switching Protocols
upgrade: websocket
connection: upgrade
sec-websocket-accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=

Structs