How To Leave A Room

Leaving a room will raise OnLeave and the other members’ clients will raise OnMemberLeave if the leave was successful.

We recommend your message include the sender's ID and other necessary information so that the recipients may detect which member has left  the room and behave accordingly. 

If a UDP client is used, the message is sent as an RUDP.

// This message will be sent to the other members when you leave the room successfully. Other members will receive the message via OnMemberLeave event
byte[] message = Encoding.UTF8.GetBytes(messageData);

room.Leave(room.GetRoomID(), message);