Class JoinRoomClient

Facilitates joining a room by emitting the joinRoom event to the server through a socket connection.

Configuration options for joining the room.

The socket instance for server communication.

The name of the room to join.

Level identifier for the user in the room.

Member identifier for the joining user.

Security token or identifier for access.

API username for server authentication.

If true, joins via joinConRoom; otherwise, joins via joinRoom.

  • A promise resolving with the server response data.
  • Throws an error if the room joining attempt fails.
const joinRoomClient = new JoinRoomClient(joinRoomService, joinConRoomService);
const response = await joinRoomClient.joinRoomClient({
socket: mySocket,
roomName: 'myRoom',
islevel: '1',
member: 'user123',
sec: 'secureToken',
apiUserName: 'apiUser',
consume: true,
});
console.log('Joined room with response:', response);

This example demonstrates using joinRoomClient to join a room, either as a consumer or a producer, based on the consume flag.

Constructors

Methods

Constructors

Methods

MMNEPVFCICPMFPCPTTAAATR