Class: SocketRoomHandler
Defined in: socket/room.ts:8
A class to handle socket room events/data.
Constructors
Constructor
new SocketRoomHandler(
room,socketId):SocketRoomHandler
Defined in: socket/room.ts:19
Parameters
room
The Room being used
socketId
string
The socket ID of the user
Returns
SocketRoomHandler
Methods
join()
join(
user):Promise<SocketRoomHandler>
Defined in: socket/room.ts:33
This method establishes multiple output actions/events that will ultimately allow a user to join a room. It will send multiple socket events to alert users that a new user has joined and should begin establishing connections with them. Users already in a different room, will be removed from that room when joining a new one.
Parameters
user
The User that is joining a room
Returns
Promise<SocketRoomHandler>
The SocketRoomHandler.
request()
request(
user):Promise<SocketRoomHandler>
Defined in: socket/room.ts:90
This method establishes multiple output actions/events that will ultimately allow a user to request to join a room. It will send multiple socket events to alert users that a new user is requesting to join a room and is waiting for approval.
Parameters
user
The User that is requesting to join a room
Returns
Promise<SocketRoomHandler>
The SocketRoomHandler.
result()
result():
Promise<SocketIOContextOutput>
Defined in: socket/room.ts:119
Returns the socket output
Returns
Promise<SocketIOContextOutput>
The output array of the events/actions.