encodeFrameData(data: string | Uint8Array): EncodedPayload
Encodes a WebSocket payload for the wire.
Text passes through unchanged; binary is base64-encoded, because a
Uint8Array survives neither JSON.stringify nor a Redis pub/sub channel
intact.
data: string | Uint8Array
The local payload
The encoded payload