dreamworkAPI
Ctrl K
GitHub
typeDocs / WebSocket / Connection

WebSocket.Connection

typesource

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

NameTypeDescription
statusintegerSTATUS_CONNECTING / STATUS_OPEN / STATUS_CLOSING / STATUS_CLOSED.
handledreamwork.engine.websocket.Handle | nilThe backend handle, nil once closed.
erroredbooleantrue once the backend reported an error on this connection.
manualbooleantrue once the close was requested locally, disables reconnecting.
close_timeoutinteger | nilThe pending graceful close timeout.
reasonstring | nilClose reason, set when closed.
codeinteger | nilClose code, set when closed.
Generated from the dreamwork meta branch.