Skip to main content

Class Peer

Controls flow of data in/out of mirage, Uses

Inheritance
System.Object
Inherited Members
Show
Syntax
public sealed class Peer : IPeer

Constructors

Peer(ISocket, Int32, IDataHandler, Config, ILogger, Metrics)

Declaration
public Peer(ISocket socket, int maxPacketSize, IDataHandler dataHandler, Config config = null, ILogger logger = null, Metrics metrics = null)
Parameters
TypeNameDescription
Mirage.SocketLayer.ISocketsocket
System.Int32maxPacketSize
Mirage.SocketLayer.IDataHandlerdataHandler
Mirage.SocketLayer.Configconfig
ILoggerlogger
Mirage.SocketLayer.Metricsmetrics

Properties

PoolMetrics

Declaration
public PoolMetrics PoolMetrics { get; }

Methods

Bind(IBindEndPoint)

Declaration
public void Bind(IBindEndPoint endPoint)
Parameters
TypeNameDescription
Mirage.SocketLayer.IBindEndPointendPoint

Connect(IConnectEndPoint)

Declaration
public IConnection Connect(IConnectEndPoint endPoint)
Parameters
TypeNameDescription
Mirage.SocketLayer.IConnectEndPointendPoint
Returns
TypeDescription
Mirage.SocketLayer.IConnection

Close()

Declaration
public void Close()

UpdateSent()

Call this at end of frame to send new batches

Declaration
public void UpdateSent()

UpdateReceive()

Call this at the start of the frame to receive new messages

Declaration
public void UpdateReceive()

GetMaxUnreliableMessageSize()

Declaration
public int GetMaxUnreliableMessageSize()
Returns
TypeDescription
System.Int32

GetMaxNotifyMessageSize()

Declaration
public int GetMaxNotifyMessageSize()
Returns
TypeDescription
System.Int32

GetMaxReliableMessageSize()

Declaration
public int GetMaxReliableMessageSize()
Returns
TypeDescription
System.Int32