System.Net.Sockets.UdpClient Members

The members of System.Net.Sockets.UdpClient are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the System.Net.Sockets.UdpClient class.

Initializes a new instance of the System.Net.Sockets.UdpClient class and binds it to the local port number provided.

Initializes a new instance of the System.Net.Sockets.UdpClient class and binds it to the specified local endpoint.

Initializes a new instance of the System.Net.Sockets.UdpClient class.

Initializes a new instance of the System.Net.Sockets.UdpClient class and binds it to the local port number provided.

Initializes a new instance of the System.Net.Sockets.UdpClient class and establishes a default remote host.

Public Properties

[read-only]
Availableint.

Gets the amount of data received from the network that is available to read.

ClientSocket.

Gets or sets the underlying network System.Net.Sockets.Socket.

DontFragmentbool.

Gets or sets a bool value that specifies whether the System.Net.Sockets.UdpClient allows Internet Protocol (IP) datagrams to be fragmented.

EnableBroadcastbool.

Gets or sets a bool value that specifies whether the System.Net.Sockets.UdpClient may send or receive broadcast packets.

ExclusiveAddressUsebool.

Gets or sets a bool value that specifies whether the System.Net.Sockets.UdpClient allows only one client to use a port.

MulticastLoopbackbool.

Gets or sets a bool value that specifies whether outgoing multicast packets are delivered to the sending application.

Ttlshort.

Gets or sets a value that specifies the Time to Live (TTL) value of Internet Protocol (IP) packets sent by the System.Net.Sockets.UdpClient.

Protected Properties

Activebool.

Gets or sets a value indicating whether a default remote host has been established.

Public Methods

BeginReceive(AsyncCallback, object) : IAsyncResult

Receives a datagram from a remote host asynchronously.

BeginSend(byte[], int, AsyncCallback, object) : IAsyncResult

Sends a datagram to a remote host asynchronously. The destination was specified previously by a call to erload:System.Net.Sockets.UdpClient.Connect.

BeginSend(byte[], int, System.Net.IPEndPoint, AsyncCallback, object) : IAsyncResult

Sends a datagram to a destination asynchronously. The destination is specified by a System.Net.EndPoint.

BeginSend(byte[], int, string, int, AsyncCallback, object) : IAsyncResult

Sends a datagram to a destination asynchronously. The destination is specified by the host name and port number.

Close()

Closes the UDP connection.

Connect(System.Net.IPEndPoint)

Establishes a default remote host using the specified network endpoint.

Connect(System.Net.IPAddress, int)

Establishes a default remote host using the specified IP address and port number.

Connect(string, int)

Establishes a default remote host using the specified host name and port number.

DropMulticastGroup(System.Net.IPAddress)

Leaves a multicast group.

DropMulticastGroup(System.Net.IPAddress, int)

Leaves a multicast group.

EndReceive(IAsyncResult, ref System.Net.IPEndPoint) : byte[]
Documentation for this section has not yet been entered.
EndSend(IAsyncResult) : int

Ends a pending asynchronous send.

Finalize()
Documentation for this section has not yet been entered.
JoinMulticastGroup(System.Net.IPAddress)

Adds a System.Net.Sockets.UdpClient to a multicast group.

JoinMulticastGroup(int, System.Net.IPAddress)

Adds a System.Net.Sockets.UdpClient to a multicast group.

JoinMulticastGroup(System.Net.IPAddress, int)

Adds a System.Net.Sockets.UdpClient to a multicast group with the specified Time to Live (TTL).

JoinMulticastGroup(System.Net.IPAddress, System.Net.IPAddress)

Adds a System.Net.Sockets.UdpClient to a multicast group.

Receive(ref System.Net.IPEndPoint) : byte[]
Documentation for this section has not yet been entered.
ReceiveAsync() : System.Threading.Tasks.Task<UdpReceiveResult>

Returns a UDP datagram asynchronously that was sent by a remote host.

Send(byte[], int) : int

Sends a UDP datagram to a remote host.

Send(byte[], int, System.Net.IPEndPoint) : int

Sends a UDP datagram to the host at the specified remote endpoint.

Send(byte[], int, string, int) : int

Sends a UDP datagram to a specified port on a specified remote host.

SendAsync(byte[], int) : System.Threading.Tasks.Task<int>

Sends a UDP datagram asynchronously to a remote host.

SendAsync(byte[], int, System.Net.IPEndPoint) : System.Threading.Tasks.Task<int>

Sends a UDP datagram asynchronously to a remote host.

SendAsync(byte[], int, string, int) : System.Threading.Tasks.Task<int>

Sends a UDP datagram asynchronously to a remote host.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.Net.Sockets.UdpClient and optionally releases the managed resources.

Explicitly Implemented Interface Members

IDisposable.Dispose

Releases all resources used by the System.Net.Sockets.UdpClient.