Skip to content

Exomia.Network.UDP

Daniel Baetz edited this page Jun 21, 2019 · 22 revisions

UdpClientApm

A UDP-Client build with the "Asynchronous Programming Model" (APM)

public class Exomia.Network.UDP.UdpClientApm
    : ClientBase, IClient, IDisposable

Constructors

    .ctor .ctor(UInt16 maxPacketSize = 65522)


Methods

SendError BeginSendData(UInt32 commandid, Byte[] data, Int32 offset, Int32 length, UInt32 responseID)

Summary:

Begins send data.

Parameter:

  • commandid - The commandid.
  • data - The data.
  • offset - The offset.
  • length - The length.
  • responseID - Identifier for the response.

void ReceiveAsync()

Summary:

Receive asynchronous.


Boolean TryCreateSocket(Socket& socket)

Summary:

Attempts to create socket.

Parameter:

  • socket - [out] The socket.


UdpClientEap

A UDP-Client build with the "Event-based Asynchronous Pattern" (EAP)

public class Exomia.Network.UDP.UdpClientEap
    : ClientBase, IClient, IDisposable

Constructors

    .ctor .ctor(Int32 maxPacketSize = 65522)


Methods

SendError BeginSendData(UInt32 commandid, Byte[] data, Int32 offset, Int32 length, UInt32 responseID)

Summary:

Begins send data.

Parameter:

  • commandid - The commandid.
  • data - The data.
  • offset - The offset.
  • length - The length.
  • responseID - Identifier for the response.

void ReceiveAsync()

Summary:

Receive asynchronous.


Boolean TryCreateSocket(Socket& socket)

Summary:

Attempts to create socket.

Parameter:

  • socket - [out] The socket.


UdpServerApmBase

A UDP-Server build with the "Asynchronous Programming Model" (APM)

public abstract class Exomia.Network.UDP.UdpServerApmBase<TServerClient>
    : ServerBase<EndPoint, TServerClient>, IServer<EndPoint>, IDisposable

Constructors

    .ctor .ctor(UInt32 maxClients, Int32 maxPacketSize = 65522)


Methods

void ListenAsync()

Summary:

Listen asynchronous.


Boolean OnRun(Int32 port, Socket& listener)

Summary:

Executes the run action.

Parameter:

  • port - The port.
  • listener - [out] The listener.

    SendError SendTo(EndPoint arg0, UInt32 commandid, Byte[] data, Int32 offset, Int32 length, UInt32 responseid)

UdpServerEapBase

A UDP-Server build with the "Event-based Asynchronous Pattern" (EAP)

public abstract class Exomia.Network.UDP.UdpServerEapBase<TServerClient>
    : ServerBase<EndPoint, TServerClient>, IServer<EndPoint>, IDisposable

Constructors

    .ctor .ctor(UInt32 maxClients, Int32 maxPacketSize = 65522)


Fields

Int32 _maxPacketSize

Summary:

_maxPacketSize.



Methods

void ListenAsync()

Summary:

Listen asynchronous.


    void OnDispose(Boolean disposing)
Boolean OnRun(Int32 port, Socket& listener)

Summary:

Executes the run action.

Parameter:

  • port - The port.
  • listener - [out] The listener.

    SendError SendTo(EndPoint arg0, UInt32 commandid, Byte[] data, Int32 offset, Int32 length, UInt32 responseid)