﻿<?xml version="1.0" encoding="utf-8"?><Type Name="UdpClient" FullName="System.Net.Sockets.UdpClient"><TypeSignature Language="C#" Value="public class UdpClient : IDisposable" Maintainer="auto" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UdpClient extends System.Object implements class System.IDisposable" /><AssemblyInfo><AssemblyName>System</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey><AssemblyVersion>1.0.3300.0</AssemblyVersion><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement><Base><BaseTypeName>System.Object</BaseTypeName></Base><Interfaces><Interface><InterfaceName>System.IDisposable</InterfaceName></Interface></Interfaces><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="T:System.Net.Sockets.UdpClient" /> class provides simple methods for sending and receiving connectionless UDP datagrams in blocking synchronous mode. Because UDP is a connectionless transport protocol, you do not need to establish a remote host connection prior to sending and receiving data. You do, however, have the option of establishing a default remote host in one of the following two ways: </para><list type="bullet"><item><para>Create an instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class using the remote host name and port number as parameters.</para></item><item><para>Create an instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class and then call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method.</para></item></list><para>You can use any of the send methods provided in the <see cref="T:System.Net.Sockets.UdpClient" /> to send data to a remote device. Use the <see cref="M:System.Net.Sockets.UdpClient.Receive(System.Net.IPEndPoint@)" /> method to receive data from remote hosts.</para><block subset="none" type="note"><para>Do not call <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> using a host name or <see cref="T:System.Net.IPEndPoint" /> if you have already specified a default remote host. If you do, <see cref="T:System.Net.Sockets.UdpClient" /> will throw an exception.</para></block><para><see cref="T:System.Net.Sockets.UdpClient" /> methods also allow you to send and receive multicast datagrams. Use the <see cref="M:System.Net.Sockets.UdpClient.JoinMulticastGroup(System.Net.IPAddress)" /> method to subscribe a <see cref="T:System.Net.Sockets.UdpClient" /> to a multicast group. Use the <see cref="M:System.Net.Sockets.UdpClient.DropMulticastGroup(System.Net.IPAddress)" /> method to unsubscribe a <see cref="T:System.Net.Sockets.UdpClient" /> from a multicast group.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Provides User Datagram Protocol (UDP) network services.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UdpClient ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor creates a new <see cref="T:System.Net.Sockets.UdpClient" /> and allows the underlying service provider to assign the most appropriate local IPv4 address and port number. If this constructor is used, the <see cref="T:System.Net.Sockets.UdpClient" /> instance is set with an address family of IPv4 that cannot be changed or overwritten by a connect method call with an IPv6 target.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block><para>This constructor is not suitable for joining a multicast group because it does not perform socket binding. Also, it works only with IPv4 address types.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class.</para></summary></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UdpClient (int port);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 port) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="port" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor creates an underlying <see cref="T:System.Net.Sockets.Socket" /> and binds it to the port number from which you intend to communicate. Use this constructor if you are only interested in setting the local port number. The underlying service provider will assign the local IP address. If you pass 0 to the constructor, the underlying service provider will assign a port number. If this constructor is used, the <see cref="T:System.Net.Sockets.UdpClient" /> instance is set with an address family of IPv4 that cannot be changed or overwritten by a connect method call with an IPv6 target.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block><para>This constructor works only with IPv4 address types.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class and binds it to the local port number provided.</para></summary><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The local port number from which you intend to communicate. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UdpClient (System.Net.IPEndPoint localEP);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Net.IPEndPoint localEP) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="localEP" Type="System.Net.IPEndPoint" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor creates a new <see cref="T:System.Net.Sockets.UdpClient" /> and binds it to the <see cref="T:System.Net.IPEndPoint" /> specified by the <paramref name="localEP" /> parameter. Before you call this constructor, you must create an <see cref="T:System.Net.IPEndPoint" /> using the IP address and port number from which you intend to send and receive data. You do not need to specify a local IP address and port number for sending and receiving data. If you do not, the underlying service provider will assign the most appropriate local IP address and port number.</para><para>If this constructor is used, the <see cref="T:System.Net.Sockets.UdpClient" /> instance is set with the address family specified by the <paramref name="localEP" /> parameter  that cannot be changed or overwritten by a connect method call with a different address family.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class and binds it to the specified local endpoint.</para></summary><param name="localEP"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Net.IPEndPoint" /> that respresents the local endpoint to which you bind the UDP connection. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UdpClient (System.Net.Sockets.AddressFamily family);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Net.Sockets.AddressFamily family) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="family" Type="System.Net.Sockets.AddressFamily" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <paramref name="family" /> parameter determines whether the listener uses an IP version 4 address (IPv4) or an IP version 6 (IPv6) address. To use an IPv4 address, pass the <see cref="F:System.Net.Sockets.AddressFamily.InterNetwork" /> value. To use an IPv6 address, pass the <see cref="F:System.Net.Sockets.AddressFamily.InterNetworkV6" /> value. Passing any other value will cause the method to throw an <see cref="T:System.ArgumentException" />.</para><para>If this constructor is used, the <see cref="T:System.Net.Sockets.UdpClient" /> instance is set with the address family specified by the <paramref name="family" /> parameter  that cannot be changed or overwritten by a connect method call with a different address family.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block><para>The <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Net.Sockets.AddressFamily)" /> is not suitable for joining a multicast group because it does not perform socket binding.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class.</para></summary><param name="family"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Net.Sockets.AddressFamily" /> values that specifies the addressing scheme of the socket. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UdpClient (int port, System.Net.Sockets.AddressFamily family);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 port, valuetype System.Net.Sockets.AddressFamily family) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="port" Type="System.Int32" /><Parameter Name="family" Type="System.Net.Sockets.AddressFamily" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor creates an underlying <see cref="T:System.Net.Sockets.Socket" /> and binds it to the port number from which you intend to communicate.</para><para>The <paramref name="family" /> parameter determines whether the listener uses an IP version 4 address (IPv4) or an IP version 6 (IPv6) address. To use an IPv4 address, pass the <see cref="F:System.Net.Sockets.AddressFamily.InterNetwork" /> value. To use an IPv6 address, pass the <see cref="F:System.Net.Sockets.AddressFamily.InterNetworkV6" /> value. Passing any other value will cause the method to throw an <see cref="T:System.ArgumentException" />.</para><para>If this constructor is used, the <see cref="T:System.Net.Sockets.UdpClient" /> instance is set with the address family specified by the <paramref name="family" /> parameter  that cannot be changed or overwritten by a connect method call with a different address family.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class and binds it to the local port number provided.</para></summary><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The port on which to listen for incoming connection attempts. </param><param name="family"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Net.Sockets.AddressFamily" /> values that specifies the addressing scheme of the socket. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UdpClient (string hostname, int port);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string hostname, int32 port) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="hostname" Type="System.String" /><Parameter Name="port" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor initializes a new <see cref="T:System.Net.Sockets.UdpClient" /> and establishes a remote host using the <paramref name="hostname" /> and <paramref name="port" /> parameters. Establishing a default remote host is optional. If you use this constructor, you do not have to specify a remote host in each call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method. Specifying a default remote host limits you to that host only. You can change the default remote host at any time by calling the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method. If you want to specify a remote host in your call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method, do not use this constructor.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Net.Sockets.UdpClient" /> class and establishes a default remote host.</para></summary><param name="hostname"><attribution license="cc4" from="Microsoft" modified="false" />The name of the remote DNS host to which you intend to connect. </param><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The remote port number to which you intend to connect. </param></Docs></Member><Member MemberName="Active"><MemberSignature Language="C#" Value="protected bool Active { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance bool Active" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>To be added: an object of type 'bool'</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Classes deriving from <see cref="T:System.Net.Sockets.UdpClient" /> can use this property to determine if a default remote host has been established. You can establish a default remote host by using the appropriate constructor or by calling the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method. If you do establish a default remote host, you cannot specify a remote host in your call to <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets a value indicating whether a default remote host has been established.</para></summary></Docs></Member><Member MemberName="Available"><MemberSignature Language="C#" Value="public int Available { get; }" /><MemberSignature Language="ILAsm" Value=".property instance int32 Available" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="P:System.Net.Sockets.UdpClient.Available" /> property is used to determine the amount of data queued in the network buffer for reading. If data is available, call <see cref="M:System.Net.Sockets.NetworkStream.Read(System.Byte[],System.Int32,System.Int32)" /> to get the data. If no data is available, the <see cref="P:System.Net.Sockets.UdpClient.Available" /> property returns 0.</para><para>If the remote host shuts down or closes the connection, the <see cref="P:System.Net.Sockets.UdpClient.Available" /> property throws a <see cref="T:System.Net.Sockets.SocketException" />. </para><block subset="none" type="note"><para> If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code and refer to the Windows Sockets version 2 API error code documentation in the MSDN library at <see cref="http://msdn.microsoft.com/library">http://msdn.microsoft.com/library</see>/ for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the amount of data received from the network that is available to read.</para></summary></Docs></Member><Member MemberName="BeginReceive"><MemberSignature Language="C#" Value="public IAsyncResult BeginReceive (AsyncCallback requestCallback, object state);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IAsyncResult BeginReceive(class System.AsyncCallback requestCallback, object state) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.IAsyncResult</ReturnType></ReturnValue><Parameters><Parameter Name="requestCallback" Type="System.AsyncCallback" /><Parameter Name="state" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The asynchronous <see cref="M:System.Net.Sockets.UdpClient.BeginReceive(System.AsyncCallback,System.Object)" /> operation must be completed by calling the <see cref="M:System.Net.Sockets.UdpClient.EndReceive(System.IAsyncResult,System.Net.IPEndPoint@)" /> method. Typically, the method is invoked by the <paramref name="requestCallback" /> delegate.</para><para>This method does not block until the operation is complete. To block until the operation is complete, use the <see cref="M:System.Net.Sockets.UdpClient.Receive(System.Net.IPEndPoint@)" /> method.</para><para>For detailed information about using the asynchronous programming model, see <format type="text/html"><a href="41972034-92ed-450a-9664-ab93fcc6f1fb">Asynchronous Programming Overview</a></format>.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Receives a datagram from a remote host asynchronously.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An <see cref="T:System.IAsyncResult" /> object that references the asynchronous receive.</para></returns><param name="requestCallback"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the operation is complete. </param><param name="state"><attribution license="cc4" from="Microsoft" modified="false" />A user-defined object that contains information about the receive operation. This object is passed to the <paramref name="requestCallback" /> delegate when the operation is complete.</param></Docs></Member><Member MemberName="BeginSend"><MemberSignature Language="C#" Value="public IAsyncResult BeginSend (byte[] datagram, int bytes, AsyncCallback requestCallback, object state);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IAsyncResult BeginSend(unsigned int8[] datagram, int32 bytes, class System.AsyncCallback requestCallback, object state) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.IAsyncResult</ReturnType></ReturnValue><Parameters><Parameter Name="datagram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /><Parameter Name="requestCallback" Type="System.AsyncCallback" /><Parameter Name="state" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The asynchronous <see cref="M:System.Net.Sockets.UdpClient.BeginSend(System.Byte[],System.Int32,System.AsyncCallback,System.Object)" /> operation must be completed by calling the <see cref="M:System.Net.Sockets.UdpClient.EndSend(System.IAsyncResult)" /> method. Typically, the method is invoked by the <paramref name="requestCallback" /> delegate.</para><para>This method does not block until the operation completes. To block until the operation is complete, use one of the <see cref="Overload:System.Net.Sockets.UdpClient.Send" /> method overloads.</para><para>For detailed information about using the asynchronous programming model, see <format type="text/html"><a href="41972034-92ed-450a-9664-ab93fcc6f1fb">Asynchronous Programming Overview</a></format>.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a datagram to a remote host asynchronously. The destination was specified previously by a call to <see cref="Overload:System.Net.Sockets.UdpClient.Connect" />.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An <see cref="T:System.IAsyncResult" /> object that references the asynchronous send.</para></returns><param name="datagram"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Byte" /> array that contains the data to be sent.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to send.</param><param name="requestCallback"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the operation is complete.</param><param name="state"><attribution license="cc4" from="Microsoft" modified="false" />A user-defined object that contains information about the send operation. This object is passed to the <paramref name="requestCallback" /> delegate when the operation is complete.</param></Docs></Member><Member MemberName="BeginSend"><MemberSignature Language="C#" Value="public IAsyncResult BeginSend (byte[] datagram, int bytes, System.Net.IPEndPoint endPoint, AsyncCallback requestCallback, object state);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IAsyncResult BeginSend(unsigned int8[] datagram, int32 bytes, class System.Net.IPEndPoint endPoint, class System.AsyncCallback requestCallback, object state) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.IAsyncResult</ReturnType></ReturnValue><Parameters><Parameter Name="datagram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /><Parameter Name="endPoint" Type="System.Net.IPEndPoint" /><Parameter Name="requestCallback" Type="System.AsyncCallback" /><Parameter Name="state" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The asynchronous <see cref="M:System.Net.Sockets.UdpClient.BeginSend(System.Byte[],System.Int32,System.Net.IPEndPoint,System.AsyncCallback,System.Object)" /> operation must be completed by calling the <see cref="M:System.Net.Sockets.UdpClient.EndSend(System.IAsyncResult)" /> method. Typically, the method is invoked by the <paramref name="requestCallback" /> delegate.</para><para>This method does not block until the operation is complete. To block until the operation is complete, use one of the <see cref="Overload:System.Net.Sockets.UdpClient.Send" /> method overloads.</para><para>For detailed information about using the asynchronous programming model, see <format type="text/html"><a href="41972034-92ed-450a-9664-ab93fcc6f1fb">Asynchronous Programming Overview</a></format>.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a datagram to a destination asynchronously. The destination is specified by a <see cref="T:System.Net.EndPoint" />.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An <see cref="T:System.IAsyncResult" /> object that references the asynchronous send.</para></returns><param name="datagram"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Byte" /> array that contains the data to be sent.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to send.</param><param name="endPoint"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.EndPoint" /> that represents the destination for the data.</param><param name="requestCallback"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the operation is complete. </param><param name="state"><attribution license="cc4" from="Microsoft" modified="false" />A user-defined object that contains information about the send operation. This object is passed to the <paramref name="requestCallback" /> delegate when the operation is complete.</param></Docs></Member><Member MemberName="BeginSend"><MemberSignature Language="C#" Value="public IAsyncResult BeginSend (byte[] datagram, int bytes, string hostname, int port, AsyncCallback requestCallback, object state);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IAsyncResult BeginSend(unsigned int8[] datagram, int32 bytes, string hostname, int32 port, class System.AsyncCallback requestCallback, object state) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.IAsyncResult</ReturnType></ReturnValue><Parameters><Parameter Name="datagram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /><Parameter Name="hostname" Type="System.String" /><Parameter Name="port" Type="System.Int32" /><Parameter Name="requestCallback" Type="System.AsyncCallback" /><Parameter Name="state" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The asynchronous <see cref="M:System.Net.Sockets.UdpClient.BeginSend(System.Byte[],System.Int32,System.String,System.Int32,System.AsyncCallback,System.Object)" /> operation must be completed by calling the <see cref="M:System.Net.Sockets.UdpClient.EndSend(System.IAsyncResult)" /> method. Typically, the method is invoked by the <paramref name="requestCallback" /> delegate.</para><para>This method does not block until the operation is complete. To block until the operation is complete, use one of the <see cref="Overload:System.Net.Sockets.UdpClient.Send" /> method overloads.</para><para>For detailed information about using the asynchronous programming model, see <format type="text/html"><a href="41972034-92ed-450a-9664-ab93fcc6f1fb">Asynchronous Programming Overview</a></format>.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a datagram to a destination asynchronously. The destination is specified by the host name and port number.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An <see cref="T:System.IAsyncResult" /> object that references the asynchronous send.</para></returns><param name="datagram"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Byte" /> array that contains the data to be sent.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to send.</param><param name="hostname"><attribution license="cc4" from="Microsoft" modified="false" />The destination host.</param><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The destination port number.</param><param name="requestCallback"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the operation is complete. </param><param name="state"><attribution license="cc4" from="Microsoft" modified="false" />A user-defined object that contains information about the send operation. This object is passed to the <paramref name="requestCallback" /> delegate when the operation is complete.</param></Docs></Member><Member MemberName="Client"><MemberSignature Language="C#" Value="public System.Net.Sockets.Socket Client { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Net.Sockets.Socket Client" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Net.Sockets.Socket</ReturnType></ReturnValue><Docs><value>To be added: an object of type 'Socket'</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para><see cref="T:System.Net.Sockets.UdpClient" /> creates a <see cref="T:System.Net.Sockets.Socket" /> used to send and receive data over a network. Classes deriving from <see cref="T:System.Net.Sockets.UdpClient" /> can use this property to get or set this <see cref="T:System.Net.Sockets.Socket" />. Use the underlying <see cref="T:System.Net.Sockets.Socket" /> returned from <see cref="P:System.Net.Sockets.UdpClient.Client" /> if you require access beyond that which <see cref="T:System.Net.Sockets.UdpClient" /> provides. You can also use <see cref="P:System.Net.Sockets.UdpClient.Client" /> to set the underlying <see cref="T:System.Net.Sockets.Socket" /> to an existing <see cref="T:System.Net.Sockets.Socket" />. This is useful if you want to take advantage of the simplicity of <see cref="T:System.Net.Sockets.UdpClient" /> using a pre-existing <see cref="T:System.Net.Sockets.Socket" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the underlying network <see cref="T:System.Net.Sockets.Socket" />.</para></summary></Docs></Member><Member MemberName="Close"><MemberSignature Language="C#" Value="public void Close ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Close() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.Close" /> disables the underlying <see cref="T:System.Net.Sockets.Socket" /> and releases all managed and unmanaged resources associated with the <see cref="T:System.Net.Sockets.UdpClient" />.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Closes the UDP connection.</para></summary></Docs></Member><Member MemberName="Connect"><MemberSignature Language="C#" Value="public void Connect (System.Net.IPEndPoint endPoint);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Connect(class System.Net.IPEndPoint endPoint) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="endPoint" Type="System.Net.IPEndPoint" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method establishes a default remote host using the value specified in the <paramref name="endPoint" /> parameter. Once established, you do not have to specify a remote host in each call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method.</para><para>Establishing a default remote host is optional. Specifying a default remote host limits you to that host only. If you want to send datagrams to a different remote host, you must make another call to the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method or create another <see cref="T:System.Net.Sockets.UdpClient" /> without a default remote host. If you have established a default remote host and you also provide a remote host in your call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method, <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para><para>If you call the <see cref="M:System.Net.Sockets.Socket.Connect(System.Net.EndPoint)" /> method, any datagrams that arrive from an address other than the specified default will be discarded. You cannot set the default remote host to a broadcast address using this method unless you inherit from <see cref="T:System.Net.Sockets.UdpClient" />, use the Client method to obtain the underlying <see cref="T:System.Net.Sockets.Socket" />, and set the socket option to <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" />.</para><para>You can however, broadcast data to the default broadcast address, 255.255.255.255, if you specify <see cref="F:System.Net.IPAddress.Broadcast" /> in your call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method. If your application requires greater control over broadcast addresses, you can also revert to using the <see cref="T:System.Net.Sockets.Socket" /> class.</para><block subset="none" type="note"><para>Since the UDP protocol is connectionless, the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method does not block. Do not call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method if you intend to receive multicasted datagrams.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Establishes a default remote host using the specified network endpoint.</para></summary><param name="endPoint"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Net.IPEndPoint" /> that specifies the network endpoint to which you intend to send data. </param></Docs></Member><Member MemberName="Connect"><MemberSignature Language="C#" Value="public void Connect (System.Net.IPAddress addr, int port);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Connect(class System.Net.IPAddress addr, int32 port) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="addr" Type="System.Net.IPAddress" /><Parameter Name="port" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method establishes a default remote host using the values specified in the <paramref name="addr" /> and <paramref name="port" /> parameters. Once established, you do not have to specify a remote host in each call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method.</para><para>Establishing a default remote host is optional. Specifying a default remote host limits you to that host only. If you want to send datagrams to a different remote host, you must make another call to the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method or create another <see cref="T:System.Net.Sockets.UdpClient" /> without a default remote host. If you have established a default remote host and you also provide a remote host in your call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method, <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para><para>If you call the <see cref="M:System.Net.Sockets.Socket.Connect(System.Net.EndPoint)" /> method, any datagrams that arrive from an address other than the specified default will be discarded. You cannot set the default remote host to a broadcast address using this method unless you inherit from <see cref="T:System.Net.Sockets.UdpClient" />, use the client method to obtain the underlying <see cref="T:System.Net.Sockets.Socket" />, and set the socket option to <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" />.</para><para>You can however, broadcast data to the default broadcast address, 255.255.255.255, if you specify <see cref="F:System.Net.IPAddress.Broadcast" /> in your call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method. If your application requires greater control over broadcast addresses, you can also revert to using the <see cref="T:System.Net.Sockets.Socket" /> class.</para><block subset="none" type="note"><para>Since the UDP protocol is connectionless, the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method does not block. Do not call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method if you intend to receive multicasted datagrams.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Establishes a default remote host using the specified IP address and port number.</para></summary><param name="addr"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.IPAddress" /> of the remote host to which you intend to send data. </param><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The port number to which you intend send data. </param></Docs></Member><Member MemberName="Connect"><MemberSignature Language="C#" Value="public void Connect (string hostname, int port);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Connect(string hostname, int32 port) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="hostname" Type="System.String" /><Parameter Name="port" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method establishes a default remote host using the values specified in the <paramref name="port" /> and <paramref name="hostname" /> parameters. Once established, you do not have to specify a remote host in each call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method.</para><para>Establishing a default remote host is optional. Specifying a default remote host limits you to that host only. If you want to send datagrams to a different remote host, you must make another call to the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method or create another <see cref="T:System.Net.Sockets.UdpClient" /> without a default remote host.</para><para>If you have established a default remote host and you also provide a remote host in your call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method, <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para><para>If you call the <see cref="M:System.Net.Sockets.Socket.Connect(System.Net.EndPoint)" /> method, any datagrams that arrive from an address other than the specified default will be discarded. You cannot set the default remote host to a broadcast address using this method unless you inherit from <see cref="T:System.Net.Sockets.UdpClient" />, use the client method to obtain the underlying <see cref="T:System.Net.Sockets.Socket" />, and set the socket option to <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" />.</para><para>You can however, broadcast data to the default broadcast address, 255.255.255.255, if you specify <see cref="F:System.Net.IPAddress.Broadcast" /> in your call to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method. If your application requires greater control over broadcast addresses, you can also revert to using the <see cref="T:System.Net.Sockets.Socket" /> class.</para><block subset="none" type="note"><para>Since the UDP protocol is connectionless, the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method does not block. Do not call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method if you intend to receive multicasted datagrams.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Establishes a default remote host using the specified host name and port number.</para></summary><param name="hostname"><attribution license="cc4" from="Microsoft" modified="false" />The DNS name of the remote host to which you intend send data. </param><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The port number on the remote host to which you intend to send data. </param></Docs></Member><Member MemberName="Dispose"><MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="disposing" Type="System.Boolean" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method is called by the public Dispose() method and the <see cref="M:System.Object.Finalize" /> method. Dispose() invokes the protected Dispose(Boolean) method with the <paramref name="disposing" /> parameter set to true. <see cref="M:System.Object.Finalize" /> invokes Dispose with <paramref name="disposing" /> set to false.</para><para>When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.Net.Sockets.UdpClient" /> references. This method invokes the Dispose() method of each referenced object.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Releases the unmanaged resources used by the <see cref="T:System.Net.Sockets.UdpClient" /> and optionally releases the managed resources. </para></summary><param name="disposing"><attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources. </param></Docs></Member><Member MemberName="DontFragment"><MemberSignature Language="C#" Value="public bool DontFragment { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance bool DontFragment" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Datagrams require fragmentation when their size exceeds the Maximum Transfer Unit (MTU) of the transmission medium. Datagrams may be fragmented by the sending host or by an intermediate router. If a datagram must be fragmented, and the <see cref="P:System.Net.Sockets.Socket.DontFragment" /> option is set, the datagram is discarded, and an Internet Control Message Protocol (ICMP) error message is sent back to the sender of the datagram.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets a <see cref="T:System.Boolean" /> value that specifies whether the <see cref="T:System.Net.Sockets.UdpClient" /> allows Internet Protocol (IP) datagrams to be fragmented.</para></summary></Docs></Member><Member MemberName="DropMulticastGroup"><MemberSignature Language="C#" Value="public void DropMulticastGroup (System.Net.IPAddress multicastAddr);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DropMulticastGroup(class System.Net.IPAddress multicastAddr) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="multicastAddr" Type="System.Net.IPAddress" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.DropMulticastGroup(System.Net.IPAddress)" /> method withdraws the <see cref="T:System.Net.Sockets.UdpClient" /> from the multicast group identified by the specified <see cref="T:System.Net.IPAddress" />. After calling the <see cref="M:System.Net.Sockets.UdpClient.DropMulticastGroup(System.Net.IPAddress)" /> method, the underlying <see cref="T:System.Net.Sockets.Socket" /> sends an Internet Group Management Protocol (IGMP) packet to the router, removing the router from the multicast group. After a <see cref="T:System.Net.Sockets.UdpClient" /> withdraws from the group, it will no longer be able to receive datagrams sent to that group.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Leaves a multicast group.</para></summary><param name="multicastAddr"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.IPAddress" /> of the multicast group to leave. </param></Docs></Member><Member MemberName="DropMulticastGroup"><MemberSignature Language="C#" Value="public void DropMulticastGroup (System.Net.IPAddress multicastAddr, int ifindex);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DropMulticastGroup(class System.Net.IPAddress multicastAddr, int32 ifindex) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="multicastAddr" Type="System.Net.IPAddress" /><Parameter Name="ifindex" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.DropMulticastGroup(System.Net.IPAddress,System.Int32)" /> method withdraws the <see cref="T:System.Net.Sockets.UdpClient" /> from the multicast group identified by the specified <see cref="T:System.Net.IPAddress" />. After calling the <see cref="M:System.Net.Sockets.UdpClient.DropMulticastGroup(System.Net.IPAddress,System.Int32)" /> method, the underlying <see cref="T:System.Net.Sockets.Socket" /> sends an Internet Group Management Protocol (IGMP) packet to the router, removing the router from the multicast group. After a <see cref="T:System.Net.Sockets.UdpClient" /> withdraws from the group, it will no longer be able to receive datagrams sent to that group.</para><block subset="none" type="note"><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use the <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> property to obtain the specific error code. After you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Leaves a multicast group.</para></summary><param name="multicastAddr"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.IPAddress" /> of the multicast group to leave. </param><param name="ifindex"><attribution license="cc4" from="Microsoft" modified="false" />The local address of the multicast group to leave.</param></Docs></Member><Member MemberName="EnableBroadcast"><MemberSignature Language="C#" Value="public bool EnableBroadcast { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance bool EnableBroadcast" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Broadcasting is limited to a specific subnet. You can broadcast to your local subnet by sending a packet to 255.255.255.255; or, you can use the directed broadcast address, which is the network portion of an Internet Protocol (IP) address with all bits set in the host portion. For example, if your IP address is 192.168.1.40 (a Class C address, with the network portion as the first three octets, and the host portion is the last octet), your directed broadcast address is 192.168.1.255.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets a <see cref="T:System.Boolean" /> value that specifies whether the <see cref="T:System.Net.Sockets.UdpClient" /> may send or receive broadcast packets.</para></summary></Docs></Member><Member MemberName="EndReceive"><MemberSignature Language="C#" Value="public byte[] EndReceive (IAsyncResult asyncResult, ref System.Net.IPEndPoint remoteEP);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance unsigned int8[] EndReceive(class System.IAsyncResult asyncResult, class System.Net.IPEndPoint remoteEP) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Byte[]</ReturnType></ReturnValue><Parameters><Parameter Name="asyncResult" Type="System.IAsyncResult" /><Parameter Name="remoteEP" Type="System.Net.IPEndPoint&amp;" RefType="ref" /></Parameters><Docs><param name="asyncResult">To be added.</param><param name="remoteEP">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs></Member><Member MemberName="EndSend"><MemberSignature Language="C#" Value="public int EndSend (IAsyncResult asyncResult);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 EndSend(class System.IAsyncResult asyncResult) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="asyncResult" Type="System.IAsyncResult" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method blocks until the operation is complete. </para><para>To perform this operation synchronously, use the <see cref="Overload:System.Net.Sockets.UdpClient.Send" /> method. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Ends a pending asynchronous send.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>If successful, the number of bytes sent to the <see cref="T:System.Net.Sockets.UdpClient" />.</para></returns><param name="asyncResult"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.IAsyncResult" /> object returned by a call to <see cref="Overload:System.Net.Sockets.UdpClient.BeginSend" />.</param></Docs></Member><Member MemberName="ExclusiveAddressUse"><MemberSignature Language="C#" Value="public bool ExclusiveAddressUse { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance bool ExclusiveAddressUse" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>By default, multiple clients can use a specific port; however, only one of the clients can perform operations on the network traffic sent to the port. You can use the <see cref="P:System.Net.Sockets.UdpClient.ExclusiveAddressUse" /> property to prevent multiple clients from using a specific port.</para><para>This property must be set before the underlying socket is bound to a client port. If you call <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Int32)" />, <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Int32,System.Net.Sockets.AddressFamily)" />, <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Net.IPEndPoint)" />, or <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.String,System.Int32)" />, the client port is bound as a side effect of the constructor, and you cannot subsequently set the <see cref="P:System.Net.Sockets.UdpClient.ExclusiveAddressUse" /> property </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets a <see cref="T:System.Boolean" /> value that specifies whether the <see cref="T:System.Net.Sockets.UdpClient" /> allows only one client to use a port.</para></summary></Docs></Member><Member MemberName="Finalize"><MemberSignature Language="C#" Value="~UdpClient ();" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Finalize() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member><Member MemberName="JoinMulticastGroup"><MemberSignature Language="C#" Value="public void JoinMulticastGroup (System.Net.IPAddress multicastAddr);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void JoinMulticastGroup(class System.Net.IPAddress multicastAddr) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="multicastAddr" Type="System.Net.IPAddress" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.JoinMulticastGroup(System.Net.IPAddress)" /> method subscribes the <see cref="T:System.Net.Sockets.UdpClient" /> to a multicast group using the specified <see cref="T:System.Net.IPAddress" />. After calling the <see cref="M:System.Net.Sockets.UdpClient.JoinMulticastGroup(System.Net.IPAddress)" /> method, the underlying <see cref="T:System.Net.Sockets.Socket" /> sends an Internet Group Management Protocol (IGMP) packet to the router requesting membership to the multicast group. The multicast address range is 224.0.0.0 to 239.255.255.255. If you specify an address outside this range or if the router to which the request is made is not multicast enabled, <see cref="T:System.Net.Sockets.UdpClient" /> will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error. Once the <see cref="T:System.Net.Sockets.UdpClient" /> is listed with the router as a member of the multicast group, it will be able to receive multicasted datagrams sent to the specified <see cref="T:System.Net.IPAddress" />.</para><block subset="none" type="note"><para>You must create the <see cref="T:System.Net.Sockets.UdpClient" /> using the multicast port number; otherwise, you will not be able to receive multicasted datagrams. Do not call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method prior to calling the <see cref="M:System.Net.Sockets.UdpClient.JoinMulticastGroup(System.Net.IPAddress)" /> method, or the <see cref="M:System.Net.Sockets.UdpClient.Receive(System.Net.IPEndPoint@)" /> method will not work. You do not need to belong to a multicast group to send datagrams to a multicast IP address.</para></block><para>Before joining a multicast group, make sure the socket is bound to the port or endpoint. You do that by calling one of the constructors that accept a port or an endpoint as a parameter.</para><para>To stop receiving multicasted datagrams, call the <see cref="M:System.Net.Sockets.UdpClient.DropMulticastGroup(System.Net.IPAddress)" /> method and provide the <see cref="T:System.Net.IPAddress" /> of the group from which you would like to withdraw.</para><block subset="none" type="note"><para>In the IPv6 case, there are several multicast address ranges you can choose from. Please, refer to the IETF RFC 2375.</para></block><block subset="none" type="note"><para>You cannot call <see cref="Overload:System.Net.Sockets.UdpClient.JoinMulticastGroup" /> on a <see cref="T:System.Net.Sockets.UdpClient" /> constructed without a specific local port (that is, using the <see cref="M:System.Net.Sockets.UdpClient.#ctor" /> or <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Net.Sockets.AddressFamily)" /> constructor).</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Adds a <see cref="T:System.Net.Sockets.UdpClient" /> to a multicast group.</para></summary><param name="multicastAddr"><attribution license="cc4" from="Microsoft" modified="false" />The multicast <see cref="T:System.Net.IPAddress" /> of the group you want to join. </param></Docs></Member><Member MemberName="JoinMulticastGroup"><MemberSignature Language="C#" Value="public void JoinMulticastGroup (int ifindex, System.Net.IPAddress multicastAddr);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void JoinMulticastGroup(int32 ifindex, class System.Net.IPAddress multicastAddr) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="ifindex" Type="System.Int32" /><Parameter Name="multicastAddr" Type="System.Net.IPAddress" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Before joining a multicast group, be sure the socket is bound to the port or endpoint. You can do this by calling one of the constructors that accepts a port or an endpoint as parameter.</para><para>The <paramref name="infindex" /> parameter is used to identify a hardware interface on the same link.</para><block subset="none" type="note"><para>There are several multicast address ranges to choose from. Refer to the IETF RFC 2375.</para></block><block subset="none" type="note"><para>You cannot call <see cref="Overload:System.Net.Sockets.UdpClient.JoinMulticastGroup" /> on a <see cref="T:System.Net.Sockets.UdpClient" /> constructed without a specific local port (that is, using the <see cref="M:System.Net.Sockets.UdpClient.#ctor" /> or <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Net.Sockets.AddressFamily)" /> constructor).</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Adds a <see cref="T:System.Net.Sockets.UdpClient" /> to a multicast group.</para></summary><param name="ifindex"><attribution license="cc4" from="Microsoft" modified="false" />The interface index associated with the local IP address on which to join the multicast group.</param><param name="multicastAddr"><attribution license="cc4" from="Microsoft" modified="false" />The multicast <see cref="T:System.Net.IPAddress" /> of the group you want to join. </param></Docs></Member><Member MemberName="JoinMulticastGroup"><MemberSignature Language="C#" Value="public void JoinMulticastGroup (System.Net.IPAddress multicastAddr, int timeToLive);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void JoinMulticastGroup(class System.Net.IPAddress multicastAddr, int32 timeToLive) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="multicastAddr" Type="System.Net.IPAddress" /><Parameter Name="timeToLive" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.JoinMulticastGroup(System.Net.IPAddress)" /> method subscribes the <see cref="T:System.Net.Sockets.UdpClient" /> to a multicast group using the specified <see cref="T:System.Net.IPAddress" />. After calling the <see cref="M:System.Net.Sockets.UdpClient.JoinMulticastGroup(System.Net.IPAddress)" /> method, the underlying <see cref="T:System.Net.Sockets.Socket" /> sends an Internet Group Management Protocol (IGMP) packet to the router requesting membership to the multicast group. The multicast address range is 224.0.0.0 to 239.255.255.255. If you specify an address outside this range or if the router to which the request is made is not multicast enabled, <see cref="T:System.Net.Sockets.UdpClient" /> will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error. The <paramref name="timeToLive" /> parameter specifies how many router hops will be allowed for a multicasted datagram before being discarded. Once the <see cref="T:System.Net.Sockets.UdpClient" /> is listed with the router as a member of the multicast group, it will be able to receive multicasted datagrams sent to the specified <see cref="T:System.Net.IPAddress" />.</para><block subset="none" type="note"><para>You must create the <see cref="T:System.Net.Sockets.UdpClient" /> using the multicast port number otherwise you will not be able to receive multicasted datagrams. Do not call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method prior to calling the <see cref="M:System.Net.Sockets.UdpClient.JoinMulticastGroup(System.Net.IPAddress)" /> method or the receive method will not work. You do not need to belong to a multicast group to send datagrams to a multicast IP address.</para></block><para>Before joining a multicast group make sure the socket is bound to the port or endpoint. You do that by calling one of the constructors that accept as parameter a port or an endpoint.</para><para>To stop receiving multicasted datagrams, call the <see cref="M:System.Net.Sockets.UdpClient.DropMulticastGroup(System.Net.IPAddress)" /> method and provide the <see cref="T:System.Net.IPAddress" /> of the group from which you would like to withdraw.</para><block subset="none" type="note"><para>You cannot call <see cref="Overload:System.Net.Sockets.UdpClient.JoinMulticastGroup" /> on a <see cref="T:System.Net.Sockets.UdpClient" /> constructed without a specific local port (that is, using the <see cref="M:System.Net.Sockets.UdpClient.#ctor" /> or <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Net.Sockets.AddressFamily)" /> constructor).</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Adds a <see cref="T:System.Net.Sockets.UdpClient" /> to a multicast group with the specified Time to Live (TTL).</para></summary><param name="multicastAddr"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.IPAddress" /> of the multicast group to join. </param><param name="timeToLive"><attribution license="cc4" from="Microsoft" modified="false" />The Time to Live (TTL), measured in router hops. </param></Docs></Member><Member MemberName="JoinMulticastGroup"><MemberSignature Language="C#" Value="public void JoinMulticastGroup (System.Net.IPAddress multicastAddr, System.Net.IPAddress localAddress);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void JoinMulticastGroup(class System.Net.IPAddress multicastAddr, class System.Net.IPAddress localAddress) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="multicastAddr" Type="System.Net.IPAddress" /><Parameter Name="localAddress" Type="System.Net.IPAddress" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Before you join a multicast group, be sure that the socket is bound to the port or endpoint. You can do this by calling one of the constructors that accepts a port or an endpoint as parameter.</para><block subset="none" type="note"><para>There are several multicast address ranges to choose from. You can find them in the IETF RFC 2375.</para></block><block subset="none" type="note"><para>You cannot call <see cref="Overload:System.Net.Sockets.UdpClient.JoinMulticastGroup" /> on a <see cref="T:System.Net.Sockets.UdpClient" /> constructed without a specific local port (that is, using the <see cref="M:System.Net.Sockets.UdpClient.#ctor" /> or <see cref="M:System.Net.Sockets.UdpClient.#ctor(System.Net.Sockets.AddressFamily)" /> constructor).</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Adds a <see cref="T:System.Net.Sockets.UdpClient" /> to a multicast group.</para></summary><param name="multicastAddr"><attribution license="cc4" from="Microsoft" modified="false" />The multicast <see cref="T:System.Net.IPAddress" /> of the group you want to join.</param><param name="localAddress"><attribution license="cc4" from="Microsoft" modified="false" />The local <see cref="T:System.Net.IPAddress" />.</param></Docs></Member><Member MemberName="MulticastLoopback"><MemberSignature Language="C#" Value="public bool MulticastLoopback { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance bool MulticastLoopback" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Multicast is a scalable method for many-to-many communication on the Internet. If a process subscribes to a multicast address, any packets sent by that process are received by every other process that has subscribed to the multicast address. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets a <see cref="T:System.Boolean" /> value that specifies whether outgoing multicast packets are delivered to the sending application.</para></summary></Docs></Member><Member MemberName="Receive"><MemberSignature Language="C#" Value="public byte[] Receive (ref System.Net.IPEndPoint remoteEP);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance unsigned int8[] Receive(class System.Net.IPEndPoint remoteEP) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Byte[]</ReturnType></ReturnValue><Parameters><Parameter Name="remoteEP" Type="System.Net.IPEndPoint&amp;" RefType="ref" /></Parameters><Docs><param name="remoteEP">To be added: an object of type 'Net.IPEndPoint&amp;'</param><summary>To be added</summary><returns>To be added: an object of type 'byte []'</returns><remarks>To be added</remarks></Docs></Member><Member MemberName="ReceiveAsync"><MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;System.Net.Sockets.UdpReceiveResult&gt; ReceiveAsync ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task`1&lt;valuetype System.Net.Sockets.UdpReceiveResult&gt; ReceiveAsync() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.Net.Sockets.UdpReceiveResult&gt;</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This operation will not block. The returned <see cref="T:System.Threading.Tasks.Task`1" />&gt; object will complete after the UDP packet has been received.</para><para>If you specify a default remote host in the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method, this method will accept datagrams from that host only. All other datagrams will be discarded.</para><para>If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para><block subset="none" type="note"><para>If you intend to receive multicasted datagrams, do not call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method prior to calling this method. The <see cref="T:System.Net.Sockets.UdpClient" /> you use to receive datagrams must be created using the multicast port number.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a UDP datagram asynchronously that was sent by a remote host.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns <see cref="T:System.Threading.Tasks.Task`1" />.</para><para>The task object representing the asynchronous operation.</para></returns></Docs></Member><Member MemberName="Send"><MemberSignature Language="C#" Value="public int Send (byte[] dgram, int bytes);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Send(unsigned int8[] dgram, int32 bytes) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="dgram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This overload sends datagrams to the remote host established in the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method and returns the number of bytes sent. If you do not call <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> before calling this overload, the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para><para>If you want to send datagrams to a different remote host, you must call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method and specify the desired remote host. Use either of the other <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method overloads to send datagrams to a broadcast address.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a UDP datagram to a remote host.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of bytes sent.</para></returns><param name="dgram"><attribution license="cc4" from="Microsoft" modified="false" />An array of type <see cref="T:System.Byte" /> that specifies the UDP datagram that you intend to send represented as an array of bytes. </param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes in the datagram. </param></Docs></Member><Member MemberName="Send"><MemberSignature Language="C#" Value="public int Send (byte[] dgram, int bytes, System.Net.IPEndPoint endPoint);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Send(unsigned int8[] dgram, int32 bytes, class System.Net.IPEndPoint endPoint) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="dgram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /><Parameter Name="endPoint" Type="System.Net.IPEndPoint" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method sends datagrams to the specified endpoint and returns the number of bytes successfully sent. Before calling this overload, you must first create an <see cref="T:System.Net.IPEndPoint" /> using the IP address and port number of the remote host to which your datagrams will be delivered. You can send datagrams to the default broadcast address, 255.255.255.255, by specifying <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" /> for the <see cref="P:System.Net.IPAddress.Address" /> property of the <see cref="T:System.Net.IPEndPoint" />. After you have created this <see cref="T:System.Net.IPEndPoint" />, pass it to the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method as the <paramref name="endPoint" /> parameter.</para><para>If you want to send datagrams to any other broadcast address, use the <see cref="P:System.Net.Sockets.UdpClient.Client" /> method to obtain the underlying <see cref="T:System.Net.Sockets.Socket" />, and set the socket option to <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" />. You can also revert to using the <see cref="T:System.Net.Sockets.Socket" /> class.</para><block subset="none" type="note"><para>Do not provide an <paramref name="endPoint" /> parameter to this method if you have already established a remote host with the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method. If you do, the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a UDP datagram to the host at the specified remote endpoint.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of bytes sent.</para></returns><param name="dgram"><attribution license="cc4" from="Microsoft" modified="false" />An array of type <see cref="T:System.Byte" /> that specifies the UDP datagram that you intend to send, represented as an array of bytes. </param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes in the datagram. </param><param name="endPoint"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Net.IPEndPoint" /> that represents the host and port to which to send the datagram. </param></Docs></Member><Member MemberName="Send"><MemberSignature Language="C#" Value="public int Send (byte[] dgram, int bytes, string hostname, int port);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Send(unsigned int8[] dgram, int32 bytes, string hostname, int32 port) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="dgram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /><Parameter Name="hostname" Type="System.String" /><Parameter Name="port" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method sends datagrams to the values specified by the <paramref name="hostname" /> and <paramref name="port" /> parameters and returns the number of bytes successfully sent. You can send datagrams to the default broadcast address by specifying "255.255.255.255" for the <paramref name="hostname" /> parameter value.</para><para>If you want to send datagrams to any other broadcast address, use the <see cref="P:System.Net.Sockets.UdpClient.Client" /> method to obtain the underlying <see cref="T:System.Net.Sockets.Socket" />, and set the socket option to <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" />. You can also revert to using the <see cref="T:System.Net.Sockets.Socket" /> class.</para><block subset="none" type="note"><para>Do not provide a host name or port number to this method if you have already established a remote host with the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method. If you do, the <see cref="M:System.Net.Sockets.UdpClient.Send(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a UDP datagram to a specified port on a specified remote host.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of bytes sent.</para></returns><param name="dgram"><attribution license="cc4" from="Microsoft" modified="false" />An array of type <see cref="T:System.Byte" /> that specifies the UDP datagram that you intend to send represented as an array of bytes. </param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes in the datagram. </param><param name="hostname"><attribution license="cc4" from="Microsoft" modified="false" />The name of the remote host to which you intend to send the datagram. </param><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The remote port number with which you intend to communicate. </param></Docs></Member><Member MemberName="SendAsync"><MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;int&gt; SendAsync (byte[] datagram, int bytes);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task`1&lt;int32&gt; SendAsync(unsigned int8[] datagram, int32 bytes) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.Int32&gt;</ReturnType></ReturnValue><Parameters><Parameter Name="datagram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This overload sends datagrams to the remote host established in the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method. If you do not call <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> before calling this overload, the method will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para><para>If you want to send datagrams to a different remote host, you must call the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method and specify the desired remote host. Use either of the other <see cref="M:System.Net.Sockets.UdpClient.SendAsync(System.Byte[],System.Int32,System.Net.IPEndPoint)" /> method overloads to send datagrams to a broadcast address.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a UDP datagram asynchronously to a remote host.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns <see cref="T:System.Threading.Tasks.Task`1" />.</para></returns><param name="datagram"><attribution license="cc4" from="Microsoft" modified="false" />An array of type <see cref="T:System.Byte" /> that specifies the UDP datagram that you intend to send represented as an array of bytes.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes in the datagram.</param></Docs></Member><Member MemberName="SendAsync"><MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;int&gt; SendAsync (byte[] datagram, int bytes, System.Net.IPEndPoint endPoint);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task`1&lt;int32&gt; SendAsync(unsigned int8[] datagram, int32 bytes, class System.Net.IPEndPoint endPoint) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.Int32&gt;</ReturnType></ReturnValue><Parameters><Parameter Name="datagram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /><Parameter Name="endPoint" Type="System.Net.IPEndPoint" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method sends datagrams to the specified endpoint. Before calling this overload, you must first create an <see cref="T:System.Net.IPEndPoint" /> using the IP address and port number of the remote host to which your datagrams will be delivered. You can send datagrams to the default broadcast address, 255.255.255.255, by specifying <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" /> for the <see cref="P:System.Net.IPAddress.Address" /> property of the <see cref="T:System.Net.IPEndPoint" />. After you have created this <see cref="T:System.Net.IPEndPoint" />, pass it to this method as the <paramref name="endPoint" /> parameter.</para><para>If you want to send datagrams to any other broadcast address, use the <see cref="P:System.Net.Sockets.UdpClient.Client" /> method to obtain the underlying <see cref="T:System.Net.Sockets.Socket" />, and set the socket option to <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" />. You can also revert to using the <see cref="T:System.Net.Sockets.Socket" /> class.</para><block subset="none" type="note"><para>Do not provide an <paramref name="endPoint" /> parameter to this method if you have already established a remote host with the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method. If you do, this method will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a UDP datagram asynchronously to a remote host.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns <see cref="T:System.Threading.Tasks.Task`1" />.</para></returns><param name="datagram"><attribution license="cc4" from="Microsoft" modified="false" />An array of type <see cref="T:System.Byte" /> that specifies the UDP datagram that you intend to send represented as an array of bytes.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes in the datagram.</param><param name="endPoint"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Net.IPEndPoint" /> that represents the host and port to which to send the datagram.</param></Docs></Member><Member MemberName="SendAsync"><MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;int&gt; SendAsync (byte[] datagram, int bytes, string hostname, int port);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task`1&lt;int32&gt; SendAsync(unsigned int8[] datagram, int32 bytes, string hostname, int32 port) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.Int32&gt;</ReturnType></ReturnValue><Parameters><Parameter Name="datagram" Type="System.Byte[]" /><Parameter Name="bytes" Type="System.Int32" /><Parameter Name="hostname" Type="System.String" /><Parameter Name="port" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method sends datagrams to the values specified by the <paramref name="hostname" /> and <paramref name="port" /> parameters. You can send datagrams to the default broadcast address by specifying "255.255.255.255" for the <paramref name="hostname" /> parameter value.</para><para>If you want to send datagrams to any other broadcast address, use the <see cref="P:System.Net.Sockets.UdpClient.Client" /> method to obtain the underlying <see cref="T:System.Net.Sockets.Socket" />, and set the socket option to <see cref="F:System.Net.Sockets.SocketOptionName.Broadcast" />. You can also revert to using the <see cref="T:System.Net.Sockets.Socket" /> class.</para><block subset="none" type="note"><para>Do not provide a host name or port number to this method if you have already established a remote host with the <see cref="M:System.Net.Sockets.UdpClient.Connect(System.String,System.Int32)" /> method. If you do, this method will throw a <see cref="T:System.Net.Sockets.SocketException" />. If you receive a <see cref="T:System.Net.Sockets.SocketException" />, use <see cref="P:System.Net.Sockets.SocketException.ErrorCode" /> to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sends a UDP datagram asynchronously to a remote host.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns <see cref="T:System.Threading.Tasks.Task`1" />.</para></returns><param name="datagram"><attribution license="cc4" from="Microsoft" modified="false" />An array of type <see cref="T:System.Byte" /> that specifies the UDP datagram that you intend to send represented as an array of bytes.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes in the datagram.</param><param name="hostname"><attribution license="cc4" from="Microsoft" modified="false" />The name of the remote host to which you intend to send the datagram.</param><param name="port"><attribution license="cc4" from="Microsoft" modified="false" />The remote port number with which you intend to communicate.</param></Docs></Member><Member MemberName="System.IDisposable.Dispose"><MemberSignature Language="C#" Value="void IDisposable.Dispose ();" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.IDisposable.Dispose() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Call <see cref="M:System.Net.Sockets.UdpClient.System#IDisposable#Dispose" /> when you are finished using the <see cref="T:System.Net.Sockets.UdpClient" />. The <see cref="M:System.Net.Sockets.UdpClient.System#IDisposable#Dispose" /> method leaves the <see cref="T:System.Net.Sockets.UdpClient" /> in an unusable state. After calling <see cref="M:System.Net.Sockets.UdpClient.System#IDisposable#Dispose" />, you must release all references to the <see cref="T:System.Net.Sockets.UdpClient" /> so the garbage collector can reclaim the memory that the <see cref="T:System.Net.Sockets.UdpClient" /> was occupying. For more information, see <format type="text/html"><a href="a17b0066-71c2-4ba4-9822-8e19332fc213">Cleaning Up Unmanaged Resources</a></format> and <format type="text/html"><a href="eb4e1af0-3b48-4fbc-ad4e-fc2f64138bf9">Implementing a Dispose Method</a></format>. </para><para>Note: Always call <see cref="M:System.Net.Sockets.UdpClient.System#IDisposable#Dispose" /> before you release your last reference to the <see cref="T:System.Net.Sockets.UdpClient" />. Otherwise, the resources it is using will not be freed until the garbage collector calls the <see cref="T:System.Net.Sockets.UdpClient" /> object's Finalize method.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Releases all resources used by the <see cref="T:System.Net.Sockets.UdpClient" />.</para></summary></Docs></Member><Member MemberName="Ttl"><MemberSignature Language="C#" Value="public short Ttl { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance int16 Ttl" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int16</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The TTL value indicates the maximum number of routers a packet can traverse before the router discards the packet and an Internet Control Message Protocol (ICMP) "TTL exceeded" error message is returned to the sender.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets a value that specifies the Time to Live (TTL) value of Internet Protocol (IP) packets sent by the <see cref="T:System.Net.Sockets.UdpClient" />.</para></summary></Docs></Member></Members></Type>