Skip to content

Class: Setup ​

The first message each endpoint sends on its control stream.

Both peers send the same message; there are no separate client and server forms and no version fields, since version negotiation happens over ALPN.

Some options are client-only (see SetupOptionType); whether a peer is allowed to send a given option depends on which side it is and on the transport, neither of which is knowable here, so that rule is enforced by the caller rather than by this class.

Constructors ​

Constructor ​

new Setup(setupOptions): Setup

Parameters ​

setupOptions ​

KeyValuePair[]

Returns ​

Setup

Properties ​

setupOptions ​

readonly setupOptions: KeyValuePair[]

Methods ​

getType() ​

getType(): ControlMessageType

Returns ​

ControlMessageType


serialize() ​

serialize(): FrozenByteBuffer

Returns ​

FrozenByteBuffer


parsePayload() ​

static parsePayload(buf): Setup

Parameters ​

buf ​

BaseByteBuffer

Returns ​

Setup