The options for joining the room.
Optional
consume?: booleanA promise that resolves with the data returned from the server.
const options = {
socket: socketInstance,
roomName: "room1",
islevel: "2",
member: "user123",
sec: "secureToken",
apiUserName: "apiUser",
consume: true
};
try {
const response = await joinRoomClient(options);
console.log("Joined room successfully:", response);
} catch (error) {
console.error("Failed to join room:", error);
}
Joins a room by emitting the
joinRoom
event to the server using the provided socket.