Skip to main content
Version: 5.11.6

OnSessionListInServer

public MatchInGameSessionListEventHandler OnSessionListInServer;

Argument

ValueTypeDescription
argsMatchInGameSessionListEventArgsInformation on the current game room

MatchInGameSessionListEventArgs

ValueTypeDescription
ErrInfoErrorCodeError information
ReasonstringError information
RoomInfoMatchInGameRoomInfoInformation on the connected room
GameRecordsList <MatchUserGameRecord>Battle history list of users who are connected to the current game room (list of battle history of each session)

Description

This event handler is called when the user connects to the game room. It is called only once to that user.
It includes the session information and matching record of users who are currently connected to the game room, including yourself.
It is also called when the user reconnects to the in-game server.

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

Event calling rules

Information of users connected to the current room + users who just entered the room is included in GameRecords.

  • Users A, B, and C are matched.
  • If there was no one in the game room and User A enters the room, the OnSessionListInServer event that contains only User A's GameRecord is called to User A.
  • If User B connects to the room while only A is in the room, the OnSessionListInServer event that contains the GameRecords of Users A and B is called to User B.
  • Finally, if User C connects to the room, the OnSessionListInServer event that contains the GameRecords of Users A, B, and C is called to User C.

Example

Backend.Match.OnSessionListInServer = (MatchInGameSessionListEventArgs args) => {
// TODO
};

Argument cases

When a user enters the game room(called only to the entered user)
ErrInfo : ErrorCode.Success
RoomInfo : "room Information"
GameRecords : information on the currently-connected users

When a user fails to connect to the game room
It is not called.