Skip to main content

Interface IConnection

Connection for

Syntax
public interface IConnection

Properties

EndPoint

Declaration
IEndPoint EndPoint { get; }

State

Declaration
ConnectionState State { get; }

Methods

Disconnect()

Declaration
void Disconnect()

SendNotify(Byte[], Int32, Int32)

Declaration
INotifyToken SendNotify(byte[] packet, int offset, int length)
Parameters
TypeNameDescription
System.Byte[]packet
System.Int32offset
System.Int32length
Returns
TypeDescription
Mirage.SocketLayer.INotifyToken

SendNotify(Byte[], Int32, Int32, INotifyCallBack)

Declaration
void SendNotify(byte[] packet, int offset, int length, INotifyCallBack callBacks)
Parameters
TypeNameDescription
System.Byte[]packet
System.Int32offset
System.Int32length
Mirage.SocketLayer.INotifyCallBackcallBacks

SendReliable(Byte[], Int32, Int32)

single message, batched by AckSystem

Declaration
void SendReliable(byte[] message, int offset, int length)
Parameters
TypeNameDescription
System.Byte[]message
System.Int32offset
System.Int32length

SendUnreliable(Byte[], Int32, Int32)

Declaration
void SendUnreliable(byte[] packet, int offset, int length)
Parameters
TypeNameDescription
System.Byte[]packet
System.Int32offset
System.Int32length

FlushBatch()

Forces the connection to send any batched message immediately to the socket

Note: this will only send the packet to the socket. Some sockets may not send on main thread so might not send immediately

Declaration
void FlushBatch()