WebSocket.Connection
One backend connection, created by every open (manual or reconnect).
Backend callbacks capture their own connection and are ignored once the socket moved on to a newer one, so late callbacks of a replaced handle cannot touch it.
Fields
| Name | Type | Description |
|---|---|---|
status | integer | STATUS_CONNECTING / STATUS_OPEN / STATUS_CLOSING / STATUS_CLOSED. |
handle | dreamwork.engine.websocket.Handle | nil | The backend handle, nil once closed. |
errored | boolean | true once the backend reported an error on this connection. |
manual | boolean | true once the close was requested locally, disables reconnecting. |
close_timeout | integer | nil | The pending graceful close timeout. |
reason | string | nil | Close reason, set when closed. |
code | integer | nil | Close code, set when closed. |