Class frame

Index

Properties

Methods

Properties

public binaryPayload: Buffer

The binary payload data. Even text frames are sent with a Buffer providing the binary payload data.

public closeStatus: number

public config: IConfig

public fin: boolean

Whether or not this is last frame in a fragmentation sequence

public frameHeader: Buffer

public frameTooLarge: boolean

public invalidCloseFrameLength: boolean

public length: number

Identifies the length of the payload data on a received frame. When sending a frame, will be automatically calculated from binaryPayload object.

public mask: number

Whether or not this frame is (or should be) masked. For outgoing frames, when connected as a client, this flag is automatically forced to true by connection. Outgoing frames sent from the server-side of a connection are not masked.

public maskBytes: Buffer

public maxReceivedFrameSize: number

public opcode: number

Identifies which kind of frame this is.

Hex - Dec - Description 0x00 - 0 - Continuation 0x01 - 1 - Text Frame 0x02 - 2 - Binary Frame 0x08 - 8 - Close Frame 0x09 - 9 - Ping Frame 0x0A - 10 - Pong Frame

public protocolError: boolean

public rsv1: boolean

Represents the RSV1 field in the framing. Setting this to true will result in a Protocol Error on the receiving peer.

public rsv2: boolean

Represents the RSV1 field in the framing. Setting this to true will result in a Protocol Error on the receiving peer.

public rsv3: boolean

Represents the RSV1 field in the framing. Setting this to true will result in a Protocol Error on the receiving peer.

Methods

public addData(bufferList: IBufferList): boolean

Parameters

Returns

boolean

public throwAwayPayload(bufferList: IBufferList): boolean

Parameters

Returns

boolean

public toBuffer(nullMask: boolean): Buffer

Parameters

  • nullMask: boolean

Returns

Buffer