Function: decode()
decode(
raw):WireMessage|undefined
Defined in: protocol.ts:186
Parse a text frame into a control message, or 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. The wire is a trusted loopback/LAN channel, so validation is shallow-but-safe — it guards against crashes on garbage, not a malicious peer.
Parameters
raw
string
Returns
WireMessage | undefined