Function joinRoomClient

Joins a room by emitting the joinRoom event to the server using the provided socket.

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);
}