Class Protocols.WebSocket.Connection
- Variable bufferedAmount
int
Protocols.WebSocket.Connection.bufferedAmount- Description
Number of bytes in the send buffer.
- Variable endpoint
protected
Standards.URI
Protocols.WebSocket.Connection.endpoint- Description
Remote endpoint URI when we are a client
- Variable extra_headers
protected
mapping
(string
:string
) Protocols.WebSocket.Connection.extra_headers- Description
Extra headers when connecting to a server
- Variable masking
bool
Protocols.WebSocket.Connection.masking- Description
If true, all outgoing frames are masked.
- Variable onclose
function
(CLOSE_STATUS
,mixed
:void
) Protocols.WebSocket.Connection.onclose- Description
This callback will be called once the WebSocket has been closed. No more frames can be sent or will be received after the close event has been triggered. This happens either when receiving a frame initiating the close handshake or after the TCP connection has been closed. Note that this is a deviation from the WebSocket API specification.
- Variable onmessage
function
(Frame
,mixed
:void
) Protocols.WebSocket.Connection.onmessage
- Variable onopen
function
(mixed
,void
|mixed
:void
) Protocols.WebSocket.Connection.onopen
- Variable state
STATE
Protocols.WebSocket.Connection.state
- Variable stream
Stdio.File
|SSL.File
Protocols.WebSocket.Connection.stream- Description
The actual client connection.
- Method create
Protocols.WebSocket.Connection Protocols.WebSocket.Connection(
Stdio.File
|SSL.File
f
,void
|int
|array
(object
)extensions
)- Description
Constructor for server mode