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
Type | Name | Description |
---|---|---|
Mirage.SocketLayer.ISocket | socket | |
System.Int32 | maxPacketSize | |
Mirage.SocketLayer.IDataHandler | dataHandler | |
Mirage.SocketLayer.Config | config | |
ILogger | logger | |
Mirage.SocketLayer.Metrics | metrics |
Properties
PoolMetrics
Declaration
public PoolMetrics PoolMetrics { get; }
Methods
Bind(IEndPoint)
Declaration
public void Bind(IEndPoint endPoint)
Parameters
Type | Name | Description |
---|---|---|
Mirage.SocketLayer.IEndPoint | endPoint |
Connect(IEndPoint)
Declaration
public IConnection Connect(IEndPoint endPoint)
Parameters
Type | Name | Description |
---|---|---|
Mirage.SocketLayer.IEndPoint | endPoint |
Returns
Type | Description |
---|---|
Mirage.SocketLayer.IConnection |
Close()
Declaration
public void Close()
UpdateReceive()
Call this at the start of the frame to receive new messages
Declaration
public void UpdateReceive()
UpdateSent()
Call this at end of frame to send new batches
Declaration
public void UpdateSent()