Skip to main content

Module proto

Module proto 

Source
Expand description

The HELLO handshake.

client -> control 7878 :  HELLO <version> <kind> <name>\n
server ->              :  PORT <n>\n              (or  ERR <reason>\n)

<kind> is tokens or trace.

A first line that is not a HELLO is not an error: the connection is treated as a raw anonymous stream defaulting to the tokens kind, so nc host 7878 < capture.txt works with no ceremony.

Enums§

HelloError
Why a line was not a usable HELLO.
StreamKind
What kind of stream a session renders.

Constants§

NAME_MAX
Maximum session-name length, in bytes.
PROTOCOL_VERSION
The protocol version this console speaks. The single source of truth for what a HELLO must claim to be accepted.

Functions§

parse_hello
Parses one handshake line, returning the stream kind and session name.