Leave a channel
How to remove a player from a Vivox channel and disconnect from communication.
阅读时间1 分钟最后更新于 18 小时前
When the game wants to remove a user from a channel, the game sends an
IChannelSession::DisconnectILoginSession.ChannelSessionsILoginSession::DeleteChannelSession- If the session is completely disconnected, the object is immediately removed from the list.
-
If the session is still in the process of disconnecting, the object is removed when the disconnection process is complete.
/* . . . */// ChannelIdToLeave is the ChannelId of the channel that is being disconnected fromMyLoginSession.GetChannelSession(ChannelIdToLeave).Disconnect();// Optionally remove disconnected channel session from list of user’s channel sessionsMyLoginSession.DeleteChannelSession(ChannelIdToLeave);/* . . . */