Class UdpSocket
Inheritance
System.Object
Inherited Members
Show
Syntax
public class UdpSocket : ISocket
Methods
Bind(IBindEndPoint)
Declaration
public void Bind(IBindEndPoint endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Mirage.SocketLayer.IBindEndPoint | endPoint |
Connect(IConnectEndPoint)
Declaration
public IConnectionHandle Connect(IConnectEndPoint endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Mirage.SocketLayer.IConnectEndPoint | endPoint |
Returns
| Type | Description |
|---|---|
| Mirage.SocketLayer.IConnectionHandle |
Close()
Declaration
public void Close()
Poll()
Declaration
public bool Poll()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Receive(Span<Byte>, out IConnectionHandle)
Declaration
public int Receive(Span<byte> outBuffer, out IConnectionHandle handle)
Parameters
| Type | Name | Description |
|---|---|---|
| Span<System.Byte> | outBuffer | |
| Mirage.SocketLayer.IConnectionHandle | handle |
Returns
| Type | Description |
|---|---|
| System.Int32 |
Send(IConnectionHandle, ReadOnlySpan<Byte>)
Declaration
public void Send(IConnectionHandle handle, ReadOnlySpan<byte> span)
Parameters
| Type | Name | Description |
|---|---|---|
| Mirage.SocketLayer.IConnectionHandle | handle | |
| 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
| Type | Name | Description |
|---|---|---|
| System.Int32 | maxPacketSize | |
| Mirage.SocketLayer.OnData | onData | |
| Mirage.SocketLayer.OnDisconnect | onDisconnect |