new connectionRoomObj()
This is a gateway object connecting connections to the rooms they are in.
- Source:
Members
(static) connectionRoomObj.events
Expose all event functions
- Source:
(static) connectionRoomObj.util
Expose all utility functions
- Source:
Methods
(static) connectionRoomObj.emitRoomDataDelta(isLeavingRoom, callback)
Emits the roomData message with a clientListDelta for the current connection to other connections in the same room.
Parameters:
Name | Type | Description |
---|---|---|
isLeavingRoom |
boolean | Is connection leaving the room? |
callback |
function | Callback with error and room data delta object. |
- Source:
(static) connectionRoomObj.generateRoomDataDelta(isLeavingRoom, callback)
Generated the roomData[room] message with a clientListDelta for the current connection to other connections in the same room.
Parameters:
Name | Type | Description |
---|---|---|
isLeavingRoom |
boolean | Is connection leaving the room? |
callback |
function | Callback with error and room data delta object. |
- Source:
(static) connectionRoomObj.getApp() → {Object}
Returns the application object to which the connection belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
The application object
- Type
- Object
(static) connectionRoomObj.getAppName() → {string}
Returns the application name for the application to which the connection belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
The application name
- Type
- string
(static) connectionRoomObj.getConnection() → {Object}
Returns the connection object to which the connection belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
The application object
- Type
- Object
(static) connectionRoomObj.getRoom() → {Object}
Returns the room object to which the connection belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
The room object
- Type
- Object
(static) connectionRoomObj.getRoomName() → {string}
Returns the room name to which the connection belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
The room name
- Type
- string
(static) connectionRoomObj.leaveRoom(nextopt)
Leaves the current room. Any room variables will be lost.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
next |
nextCallback |
<optional> |
A success callback of form next(err). |
- Source:
(static) connectionRoomObj.setApiField(apiFieldObj, next)
Sets the API field for the current connection in a room.
Parameters:
Name | Type | Description |
---|---|---|
apiFieldObj |
object | A API field object, including the field name and field value. |
next |
nextCallback | A success callback of form next(err). |
- Source: