Joins a room by emitting the joinRoom event to the server using the provided socket.
joinRoom
Throws an error if the room joining process fails.
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);} Copy
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);}
The options for joining the room.
A promise that resolves with the data returned from the server.
Joins a room by emitting the
joinRoom
event to the server using the provided socket.Throws
Throws an error if the room joining process fails.
Example