Skip to main content

Interface IDataHandler

Handles data from SocketLayer A high level script should implement this interface give it to Peer when it is created

Syntax​
public interface IDataHandler

Methods​

ReceiveMessage(IConnection, ArraySegment<Byte>)​

Receives a new Packet from low level

IMPORTANT: message is a shared/pooled buffer and is only valid during this call. Copy the data if it needs to be retained.

Declaration​
void ReceiveMessage(IConnection connection, ArraySegment<byte> message)
Parameters​
TypeNameDescription
Mirage.SocketLayer.IConnectionconnectionconnection that sent data
System.ArraySegment<System.Byte>messageSingle message received by peer