object

http_websocket_handshake

Shared helpers for WebSocket opening-handshake key generation and accept-value computation.

Availability:
logtalk_load(http_websocket_handshake(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-06-11
Compilation flags:
static, context_switching_calls
Remarks:
(none)
Inherited public predicates:
(none)

Public predicates

websocket_opening_key/1

Generates a canonical base64-encoded 16-byte WebSocket opening key.

Compilation flags:
static
Template:
websocket_opening_key(Key)
Mode and number of proofs:
websocket_opening_key(--atom) - one

websocket_accept/2

Computes the canonical Sec-WebSocket-Accept value for a valid WebSocket opening key.

Compilation flags:
static
Template:
websocket_accept(Key,Accept)
Mode and number of proofs:
websocket_accept(++term,--atom) - one_or_error
Exceptions:
Key is a variable:
instantiation_error
Key is not a valid WebSocket opening key value:
domain_error(http_websocket_key,Key)

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)