Class Protocols.WebSocket.Frame
- Variable close_reason
string
Protocols.WebSocket.Frame.close_reason
- Variable data
string
Protocols.WebSocket.Frame.data- Description
Data part of the frame. Valid for frames of type FRAME_BINARY, FRAME_PING and FRAME_PONG.
- Variable fin
bool
Protocols.WebSocket.Frame.fin- Description
Set to
1
if this a final frame, i.e. the last frame of a fragmented message or a non-fragmentation frame.
- Variable opcode
FRAME
Protocols.WebSocket.Frame.opcode
- Variable options
mapping
(string
:mixed
) Protocols.WebSocket.Frame.options- Description
Generic options for this frame.
- Variable reason
CLOSE_STATUS
Protocols.WebSocket.Frame.reason- Description
Only exists for frames of type FRAME_CLOSE.
- Variable rsv
int
Protocols.WebSocket.Frame.rsv- Description
Three reserved extension bits. Binary-and with
RSV1
,RSV2
orRSV3
to single out the corresponding extension. TypicallyRSV1
is set for compressed frames.
- Variable text
string
Protocols.WebSocket.Frame.text- Description
Only exists for frames of type FRAME_TEXT.
- Method create
Protocols.WebSocket.Frame Protocols.WebSocket.Frame(
FRAME
opcode
,void
|string
|CLOSE_STATUS
)
Protocols.WebSocket.Frame Protocols.WebSocket.Frame(
FRAME_TEXT
,string
text
,void
|bool
fin
)
Protocols.WebSocket.Frame Protocols.WebSocket.Frame(
FRAME_BINARY
,string(8bit)
data
,void
|bool
fin
)
Protocols.WebSocket.Frame Protocols.WebSocket.Frame(
FRAME_CONTINUATION
,string(8bit)
data
,void
|bool
fin
)
Protocols.WebSocket.Frame Protocols.WebSocket.Frame(
FRAME_CLOSE
,CLOSE_STATUS
reason
)
Protocols.WebSocket.Frame Protocols.WebSocket.Frame(
FRAME_PING
,string(8bit)
data
)
Protocols.WebSocket.Frame Protocols.WebSocket.Frame(
FRAME_PONG
,string(8bit)
data
)