UdpClient Class
Namespace: System.Net.Sockets · Assembly: GHIElectronics.TinyCLR.Networking
No description available.
public class UdpClient : IDisposable
Constructors
UdpClient()
public UdpClient() : this(AddressFamily.InterNetwork)
No description available.
UdpClient(AddressFamily family)
public UdpClient(AddressFamily family)
No description available.
| Parameter | Type | Description |
|---|---|---|
family | AddressFamily |
UdpClient(int port)
public UdpClient(int port) : this(port, AddressFamily.InterNetwork)
No description available.
| Parameter | Type | Description |
|---|---|---|
port | int |
UdpClient(int port, AddressFamily family)
public UdpClient(int port, AddressFamily family)
No description available.
| Parameter | Type | Description |
|---|---|---|
port | int | |
family | AddressFamily |
UdpClient(IPEndPoint localEP)
public UdpClient(IPEndPoint localEP)
No description available.
| Parameter | Type | Description |
|---|---|---|
localEP | IPEndPoint |
UdpClient(string hostname, int port)
public UdpClient(string hostname, int port)
No description available.
| Parameter | Type | Description |
|---|---|---|
hostname | string | |
port | int |
Properties
Active
protected bool Active { get; set; }
No description available.
Available
public int Available { get; }
No description available.
Client
public Socket Client { get; set; }
No description available.
Methods
Dispose()
public void Dispose()
Releases buffered memory (the unmanaged firmware/application buffers). (inherited)
Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
Closes a response stream, if present. (inherited)
| Parameter | Type | Description |
|---|---|---|
disposing | bool | Not used. |
BeginSend(byte[] datagram, int bytes)
public int BeginSend(byte[] datagram, int bytes)
No description available.
| Parameter | Type | Description |
|---|---|---|
datagram | byte[] | |
bytes | int |
Returns int
BeginSend(byte[] datagram, int bytes, string hostname, int port)
public int BeginSend(byte[] datagram, int bytes, string hostname, int port)
No description available.
| Parameter | Type | Description |
|---|---|---|
datagram | byte[] | |
bytes | int | |
hostname | string | |
port | int |
Returns int
BeginSend(byte[] datagram, int bytes, IPEndPoint endPoint)
public int BeginSend(byte[] datagram, int bytes, IPEndPoint endPoint)
No description available.
| Parameter | Type | Description |
|---|---|---|
datagram | byte[] | |
bytes | int | |
endPoint | IPEndPoint |
Returns int
EndSend(IAsyncResult asyncResult)
public int EndSend(IAsyncResult asyncResult)
No description available.
| Parameter | Type | Description |
|---|---|---|
asyncResult | IAsyncResult |
Returns int
BeginReceive(int port)
public int BeginReceive(int port)
No description available.
| Parameter | Type | Description |
|---|---|---|
port | int |
Returns int
EndReceive(IAsyncResult asyncResult, ref IPEndPoint remoteEP)
public byte[] EndReceive(IAsyncResult asyncResult, ref IPEndPoint remoteEP)
No description available.
| Parameter | Type | Description |
|---|---|---|
asyncResult | IAsyncResult | |
remoteEP | ref IPEndPoint |
Returns byte[]
JoinMulticastGroup(IPAddress multicastAddr)
public void JoinMulticastGroup(IPAddress multicastAddr)
No description available.
| Parameter | Type | Description |
|---|---|---|
multicastAddr | IPAddress |
Close()
public void Close()
When overridden by a descendant class, closes the response stream. (inherited)
Connect(string hostname, int port)
public void Connect(string hostname, int port)
No description available.
| Parameter | Type | Description |
|---|---|---|
hostname | string | |
port | int |
Connect(IPAddress addr, int port)
public void Connect(IPAddress addr, int port)
No description available.
| Parameter | Type | Description |
|---|---|---|
addr | IPAddress | |
port | int |
Connect(IPEndPoint endPoint)
public void Connect(IPEndPoint endPoint)
No description available.
| Parameter | Type | Description |
|---|---|---|
endPoint | IPEndPoint |
Receive(ref IPEndPoint remoteEP)
public byte[] Receive(ref IPEndPoint remoteEP)
No description available.
| Parameter | Type | Description |
|---|---|---|
remoteEP | ref IPEndPoint |
Returns byte[]
Send(byte[] dgram, int bytes, IPEndPoint endPoint)
public int Send(byte[] dgram, int bytes, IPEndPoint endPoint)
Sends a UDP datagram to a specified port on a specified remote host. (inherited)
| Parameter | Type | Description |
|---|---|---|
dgram | byte[] | |
bytes | int | |
endPoint | IPEndPoint |
Returns int — The number of bytes sent.
Send(byte[] datagram, IPEndPoint endPoint)
public int Send(byte[] datagram, IPEndPoint endPoint)
Sends a UDP datagram to the host at the specified remote endpoint.
| Parameter | Type | Description |
|---|---|---|
datagram | byte[] | An ReadOnlySpan{T} of Type byte that specifies the UDP datagram that you intend to send. |
endPoint | IPEndPoint | An IPEndPoint that represents the host and port to which to send the datagram. |
Returns int — The number of bytes sent.
Send(byte[] dgram, int bytes, string hostname, int port)
public int Send(byte[] dgram, int bytes, string hostname, int port)
No description available.
| Parameter | Type | Description |
|---|---|---|
dgram | byte[] | |
bytes | int | |
hostname | string | |
port | int |
Returns int
Send(byte[] datagram, string hostname, int port)
public int Send(byte[] datagram, string hostname, int port)
Sends a UDP datagram to a specified port on a specified remote host.
| Parameter | Type | Description |
|---|---|---|
datagram | byte[] | An ReadOnlySpan{T} of Type byte that specifies the UDP datagram that you intend to send. |
hostname | string | The name of the remote host to which you intend to send the datagram. |
port | int | The remote port number with which you intend to communicate. |
Returns int — The number of bytes sent.
Send(byte[] dgram, int bytes)
public int Send(byte[] dgram, int bytes)
Sends a UDP datagram to the host at the specified remote endpoint. (inherited)
| Parameter | Type | Description |
|---|---|---|
dgram | byte[] | |
bytes | int |
Returns int — The number of bytes sent.
Send(byte[] datagram)
public int Send(byte[] datagram)
Sends a UDP datagram to a remote host.
| Parameter | Type | Description |
|---|---|---|
datagram | byte[] | An ReadOnlySpan{T} of Type byte that specifies the UDP datagram that you intend to send. |
Returns int — The number of bytes sent.