NetworkClient
Index
Properties
auth
canJoinFullRooms
Whether or not this client should bypass the client count check.
data
Custom data associated with this NetworkClient. You may set this to anything.
readonlyid
The id of this client
optionalroom
The room this client is in
status
Connection status
Methods
close
Disconnects a client
Parameters
code: number = 0
WebSocket close code
reason: string = null
WebSocket close reason, also sent as a CloseReason to the client.
Returns void
send
Sends a message to this client
Type parameters
- T = string | number
- T2 = string | number | object | Buffer
Parameters
event: T
Unique identifier for this event. See onMessage for more info about event identifiers.
data: T2
Data that will be sent to this client.
Returns void
Custom auth data associated with this NetworkClient. You may set this to anything.