Skip to main content
Version: 5.11.8

OnMatchRelay

public MatchRelayEventHandler OnMatchRelay;

Argument

ValueTypeDescription
argsMatchRelayEventArgsInformation on binary data broadcasted by the server

MatchRelayEventArgs

ValueTypeDescription
FromSessionInfoInformation on the session that sent the data(information of user who sent the data)
BinaryUserDatabyte[]Sent data

Description

This event is called when the client broadcasts the message sent to the server using the SendDataToInGameRoom method to all clients connected to the game room.
It is also called when you send a message.

You may transform the received binary data into a type suitable for each game.

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

Example

Backend.Match.OnMatchRelay = (MatchRelayEventArgs args) => {
// TODO
};

Argument cases

When binary data is received
From : session information of the user who sent the data
BinaryUserData : sent data