Socketio.join()

Subscribes the specified sockets to a room.

Subscribes the sockets to the room with the specified name. Any messages subsequently broadcast to the room will be received by those sockets.

Usage

Hover over inputs/exits for more info.

var Socketio = require('machinepack-sockets');


// Subscribes the specified sockets to a room.

Socketio.join({

roomName: 'myChatRoom',

socketIds: [ 'a82ghda99319gadgaa3249103' ],

}).execSync();

Inputs

roomName required

The name of the room to join.

'myChatRoom'
socketIds required

Unique identifiers of the sockets to subscribe to the room.

[ 'a82ghda99319gadgaa3249103' ]

Exits

error

An unexpected error occurred.

success

OK.