Skip to content

Function: decode()

decode(raw): WireMessage | undefined

Defined in: protocol.ts:336

Parse a text frame. Returns undefined for anything that is not a JSON object with a string type — a malformed frame is dropped, never thrown: one bad message from one client must not take down a relay serving others.

Parameters

raw

string

Returns

WireMessage | undefined