Skip to main content

Class NanoSocket

Inheritance​
System.Object
Inherited Members​
Show
Syntax​
public sealed class NanoSocket : ISocket

Constructors​

NanoSocket(Int32)​

Declaration​
public NanoSocket(int bufferSize)
Parameters​
TypeNameDescription
System.Int32bufferSize

Properties​

Supported​

Declaration​
public static bool Supported { get; }

Methods​

Bind(IBindEndPoint)​

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

Connect(IConnectEndPoint)​

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

Close()​

Declaration​
public void Close()

Poll()​

Declaration​
public bool Poll()
Returns​
TypeDescription
System.Boolean

Receive(Span<Byte>, out IConnectionHandle)​

Declaration​
public int Receive(Span<byte> outBuffer, out IConnectionHandle handle)
Parameters​
TypeNameDescription
Span<System.Byte>outBuffer
Mirage.SocketLayer.IConnectionHandlehandle
Returns​
TypeDescription
System.Int32

Send(IConnectionHandle, ReadOnlySpan<Byte>)​

Declaration​
public void Send(IConnectionHandle handle, ReadOnlySpan<byte> span)
Parameters​
TypeNameDescription
Mirage.SocketLayer.IConnectionHandlehandle
ReadOnlySpan<System.Byte>span

ISocket.Tick()​

Declaration​
void ISocket.Tick()

ISocket.Flush()​

Declaration​
void ISocket.Flush()

ISocket.SetTickEvents(Int32, OnData, OnDisconnect)​

Declaration​
void ISocket.SetTickEvents(int maxPacketSize, OnData onData, OnDisconnect onDisconnect)
Parameters​
TypeNameDescription
System.Int32maxPacketSize
Mirage.SocketLayer.OnDataonData
Mirage.SocketLayer.OnDisconnectonDisconnect