[deprecated] OnSessionOnlineGuildChannel
public SessionOnlineEventHandler OnSessionOnlineGuildChannel;
Deprecation notice
- This feature is no longer supported in BACKND versions 5.5.0 or later. The connection is completely destroyed on failure, and OnLeaveGuildChannel handler is called instead.
Argument
Value | Type | Description |
---|---|---|
args | SessionOnlineEventArgs | Whether reconnecting to the chat server succeeded/failed |
SessionOnlineEventArgs
Value | Type | Description |
---|---|---|
ErrInfo | ErrorInfo | Success/failure information |
Session | SessionInfo | SessionInfo of the user disconnected from the channel |
Description
This is an event that is called when another user is reconnected after being temporarily disconnected from the guild channel.
In order for an event to be called, the message sending/receiving method must be called.
Example
// First way
Backend.Chat.OnSessionOnlineGuildChannel = (SessionOnlineEventArgs args) =>
{
Debug.Log(string.Format("OnSessionOnlineGuildChannel {0}", args.ErrInfo));
// When reentered successfully
if(args.ErrInfo == ErrorInfo.Success)
{
// When you connect
if(!args.Session.IsRemote)
{
Debug.Log("Reconnected to the channel.");
}
// When another user connects
else
{
Debug.log(args.Session.Nickname + " reconnected.");
}
}
else
{
// When an error occurs
Debug.Log("An error occurred during re-entrance : " + args.ErrInfo.Reason);
}
};
// Second way
Backend.Chat.OnSessionOnlineGuildChannel += (args) => {
// Same logic as the first way
}
Argument cases
When reconnection to the chat server is successful ErrInfo.Category: Success ErrInfo.Detail: NetworkOnline ErrInfo.SocketError: Success ErrInfo.Reason: Session Reconnect