Class: SocketRoomSystem

SocketRoomSystem(appConstructor, io, app)

Room system compatible with socket layer.

Constructor

new SocketRoomSystem(appConstructor, io, app)

Creates SocketRoomSystem instance.

Parameters:
Name Type Description
appConstructor function

App constructor. Keep in mind, custom app must implement onConnect, and recieveData methods.

io Object

socket.io io instance.

app Object

Express app.

Source:

Members

app

Properties:
Name Type Description
app Object

Express app.

Source:

eventNames

Properties:
Name Type Description
eventNames Object

List of all events SocketRoomSystem can handle.

Source:

io

Properties:
Name Type Description
io Object

socket.io io instance.

Source:

roomSystem

Properties:
Name Type Description
roomSystem RoomSystem

RoomSystem}RoomSystem instance. That's where all the [room managment logic lays.

Source:

Methods

start() → {void}

Starts listening for socket.io emits from clients, and exposes socketRoomSystem-Client in socketRoomSystem-Client folder for clients.

Source:
Returns:
Type
void