Class: EdgeRoom
@roomful/relay / EdgeRoom
Class: EdgeRoom
Section titled “Class: EdgeRoom”Defined in: packages/relay/src/edge-room.ts:73
Holds the peers of one room and applies the relay protocol to their messages.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new EdgeRoom(
options):EdgeRoom
Defined in: packages/relay/src/edge-room.ts:78
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”EdgeRoom
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size():
number
Defined in: packages/relay/src/edge-room.ts:80
Returns
Section titled “Returns”number
Methods
Section titled “Methods”handleMessage()
Section titled “handleMessage()”handleMessage(
connection,raw,token?):Promise<void>
Defined in: packages/relay/src/edge-room.ts:88
Handles one inbound frame from a connection. token is the connection’s auth token
(from the upgrade request), consulted only for join.
Parameters
Section titled “Parameters”connection
Section titled “connection”string | Uint8Array<ArrayBufferLike>
token?
Section titled “token?”string
Returns
Section titled “Returns”Promise<void>
removeConnection()
Section titled “removeConnection()”removeConnection(
connection):void
Defined in: packages/relay/src/edge-room.ts:139
Removes a connection’s peer (on socket close or leave) and notifies the room.
Parameters
Section titled “Parameters”connection
Section titled “connection”Returns
Section titled “Returns”void