Room に Join する方法

Room に参加するには、その Room の ID が必要です。Room IDを外部に保存するか、マッチメーカーを使って Room IDを共有する必要があるでしょう。また、メッセージには送信者のユーザーIDなどの必要な情報を含めることをお勧めします。これにより、受信者は誰が参加したかを検知し、それに応じた行動を取ることができます。クライアントが Room に参加すると、OnJoin が発生します。その Room の他のメンバーのクライアントは、 OnMemberJoin を発生させます。  UDP クライアントを使用している場合、メッセージは RUDP として送信されます。

uint64_t          uid;
vector<uint8_t> message(sizeof(uid));
const uint8_t* p = message.data();

*(uint64_t*)p = uid;

// This message will be sent to the other members when you join the room successfully.
// Other members will receive the message via OnMemberJoin event
room->Join(roomID, message);