Skip to main content
Version: 5.11.6

OnLeaveMatchMakingServer

public LeaveChannelEventHandler OnLeaveMatchMakingServer;

Argument

ValueTypeDescription
argsLeaveChannelEventArgsSuccess/failure status of termination of connection to the server

LeaveChannelEventArgs

ValueTypeDescription
ErrInfoErrorInfoError information
SessionInfoSessionInfoInformation on the terminated session

Description

This event is called when the connection to the server is terminated.
This event may be called in the following cases:

  • When the client explicitly terminates connection to the server
  • Matching type that was not created in the console is requested
  • Matching server disconnects from the client due to an abnormal reason.

In order for an event to be called, the message sending/receiving method must be called.

Example

Backend.Match.OnLeaveMatchMakingServer = (LeaveChannelEventArgs args) =>
{
// TODO
};

Argument cases

When the connection to the matching server is terminated properly
ErrInfo.Category : ErrorCode.Success
ErrInfo.Detail : ErrorCode.DisconnectFromLocal

When the matching server disconnects from the client forcibly due to an abnormal reason
ErrInfo.Category : ErrorCode.Exception
ErrInfo.Detail : ErrorCode.DisconnectFromRemote

When a match type that was not created in the console is requested
ErrInfo.Category : ErrorCode.DisconnectFromRemote
ErrInfo.Detail : ErrorCode.Exception
ErrInfo.Reason : boost::bad_format_string: format-string is ill-formed

When connection between the match server and the client is lost for more than 30 seconds
(e.g.: Poll method is not called, or the game is moved to the background)

ErrInfo.Category : ErrorCode.NetworkTimeout
ErrInfo.Reason : Session Disconnect(0)