Class BaseUdpClient
Represents a base abstraction for all UDP client implementations.
Inheritance
System.Object
BaseUdpClient
Namespace: DisCatSharp.Net.Udp
Assembly: DisCatSharp.dll
Syntax
public abstract class BaseUdpClient
Methods
| Improve this Doc View SourceClose()
Closes and disposes the client.
Declaration
public abstract void Close()
ReceiveAsync()
Receives a datagram.
Declaration
public abstract Task<byte[]> ReceiveAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Byte[]> | The received bytes. |
SendAsync(Byte[], Int32)
Sends a datagram.
Declaration
public abstract Task SendAsync(byte[] data, int dataLength)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | Datagram. |
System.Int32 | dataLength | Length of the datagram. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Setup(ConnectionEndpoint)
Configures the UDP client.
Declaration
public abstract void Setup(ConnectionEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
ConnectionEndpoint | endpoint | Endpoint that the client will be communicating with. |