System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.3300.0 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.IDisposable

The 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:

Create an instance of the class using the remote host name and port number as parameters.

Create an instance of the class and then call the method.

You can use any of the send methods provided in the to send data to a remote device. Use the method to receive data from remote hosts.

Do not call using a host name or if you have already specified a default remote host. If you do, will throw an exception.

methods also allow you to send and receive multicast datagrams. Use the method to subscribe a to a multicast group. Use the method to unsubscribe a from a multicast group.

Provides User Datagram Protocol (UDP) network services.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor creates a new and allows the underlying service provider to assign the most appropriate local IPv4 address and port number. If this constructor is used, the instance is set with an address family of IPv4 that cannot be changed or overwritten by a connect method call with an IPv6 target.

  If you receive a , use 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.

  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.

  Initializes a new instance of the class.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor creates an underlying 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 instance is set with an address family of IPv4 that cannot be changed or overwritten by a connect method call with an IPv6 target.

  If you receive a , use 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.

  This constructor works only with IPv4 address types.

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

  The local port number from which you intend to communicate.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor creates a new and binds it to the specified by the parameter. Before you call this constructor, you must create an 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.

  If this constructor is used, the instance is set with the address family specified by the parameter that cannot be changed or overwritten by a connect method call with a different address family.

  If you receive a , use 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.

  Initializes a new instance of the class and binds it to the specified local endpoint.

  An that respresents the local endpoint to which you bind the UDP connection.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The 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 value. To use an IPv6 address, pass the value. Passing any other value will cause the method to throw an .

  If this constructor is used, the instance is set with the address family specified by the parameter that cannot be changed or overwritten by a connect method call with a different address family.

  If you receive a , use 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 is not suitable for joining a multicast group because it does not perform socket binding.

  Initializes a new instance of the class.

  One of the values that specifies the addressing scheme of the socket.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor creates an underlying and binds it to the port number from which you intend to communicate.

  The 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 value. To use an IPv6 address, pass the value. Passing any other value will cause the method to throw an .

  If this constructor is used, the instance is set with the address family specified by the parameter that cannot be changed or overwritten by a connect method call with a different address family.

  If you receive a , use 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.

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

  The port on which to listen for incoming connection attempts.
  One of the values that specifies the addressing scheme of the socket.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  This constructor initializes a new and establishes a remote host using the and 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 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 method. If you want to specify a remote host in your call to the method, do not use this constructor.

  If you receive a , use 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.

  Initializes a new instance of the class and establishes a default remote host.

  The name of the remote DNS host to which you intend to connect.
  The remote port number to which you intend to connect.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added: an object of type 'bool'

  Classes deriving from 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 method. If you do establish a default remote host, you cannot specify a remote host in your call to .

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

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The property is used to determine the amount of data queued in the network buffer for reading. If data is available, call to get the data. If no data is available, the property returns 0.

  If the remote host shuts down or closes the connection, the property throws a .

  If you receive a , use to obtain the specific error code and refer to the Windows Sockets version 2 API error code documentation in the MSDN library at http://msdn.microsoft.com/library/ for a detailed description of the error.

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

- Method
  2.0.0.0
  4.0.0.0
  System.IAsyncResult `` ``

  The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the delegate.

  This method does not block until the operation is complete. To block until the operation is complete, use the method.

  For detailed information about using the asynchronous programming model, see Asynchronous Programming Overview.

  Receives a datagram from a remote host asynchronously.

  An object that references the asynchronous receive.

  An delegate that references the method to invoke when the operation is complete. A user-defined object that contains information about the receive operation. This object is passed to the delegate when the operation is complete.
- Method
  2.0.0.0
  4.0.0.0
  System.IAsyncResult `` `` `` ``

  The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the delegate.

  This method does not block until the operation completes. To block until the operation is complete, use one of the method overloads.

  For detailed information about using the asynchronous programming model, see Asynchronous Programming Overview.

  Sends a datagram to a remote host asynchronously. The destination was specified previously by a call to .

  An object that references the asynchronous send.

  A array that contains the data to be sent. The number of bytes to send. An delegate that references the method to invoke when the operation is complete. A user-defined object that contains information about the send operation. This object is passed to the delegate when the operation is complete.
- Method
  2.0.0.0
  4.0.0.0
  System.IAsyncResult `` `` `` `` ``

  The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the delegate.

  This method does not block until the operation is complete. To block until the operation is complete, use one of the method overloads.

  For detailed information about using the asynchronous programming model, see Asynchronous Programming Overview.

  Sends a datagram to a destination asynchronously. The destination is specified by a .

  An object that references the asynchronous send.

  A array that contains the data to be sent. The number of bytes to send. The that represents the destination for the data. An delegate that references the method to invoke when the operation is complete. A user-defined object that contains information about the send operation. This object is passed to the delegate when the operation is complete.
- Method
  2.0.0.0
  4.0.0.0
  System.IAsyncResult `` `` `` `` `` ``

  The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the delegate.

  This method does not block until the operation is complete. To block until the operation is complete, use one of the method overloads.

  For detailed information about using the asynchronous programming model, see Asynchronous Programming Overview.

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

  An object that references the asynchronous send.

  A array that contains the data to be sent. The number of bytes to send. The destination host. The destination port number. An delegate that references the method to invoke when the operation is complete. A user-defined object that contains information about the send operation. This object is passed to the delegate when the operation is complete.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.Sockets.Socket To be added: an object of type 'Socket'

  creates a used to send and receive data over a network. Classes deriving from can use this property to get or set this . Use the underlying returned from if you require access beyond that which provides. You can also use to set the underlying to an existing . This is useful if you want to take advantage of the simplicity of using a pre-existing .

  Gets or sets the underlying network .

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  The disables the underlying and releases all managed and unmanaged resources associated with the .

  If you receive a , use 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.

  Closes the UDP connection.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method establishes a default remote host using the value specified in the parameter. Once established, you do not have to specify a remote host in each call to the method.

  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 method or create another 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 method, will throw a . If you receive a , use 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.

  If you call the 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 , use the Client method to obtain the underlying , and set the socket option to .

  You can however, broadcast data to the default broadcast address, 255.255.255.255, if you specify in your call to the method. If your application requires greater control over broadcast addresses, you can also revert to using the class.

  Since the UDP protocol is connectionless, the method does not block. Do not call the method if you intend to receive multicasted datagrams.

  Establishes a default remote host using the specified network endpoint.

  An that specifies the network endpoint to which you intend to send data.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method establishes a default remote host using the values specified in the and parameters. Once established, you do not have to specify a remote host in each call to the method.

  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 method or create another 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 method, will throw a . If you receive a , use 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.

  If you call the 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 , use the client method to obtain the underlying , and set the socket option to .

  You can however, broadcast data to the default broadcast address, 255.255.255.255, if you specify in your call to the method. If your application requires greater control over broadcast addresses, you can also revert to using the class.

  Since the UDP protocol is connectionless, the method does not block. Do not call the method if you intend to receive multicasted datagrams.

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

  The of the remote host to which you intend to send data. The port number to which you intend send data.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method establishes a default remote host using the values specified in the and parameters. Once established, you do not have to specify a remote host in each call to the method.

  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 method or create another 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 method, will throw a . If you receive a , use 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.

  If you call the 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 , use the client method to obtain the underlying , and set the socket option to .

  You can however, broadcast data to the default broadcast address, 255.255.255.255, if you specify in your call to the method. If your application requires greater control over broadcast addresses, you can also revert to using the class.

  Since the UDP protocol is connectionless, the method does not block. Do not call the method if you intend to receive multicasted datagrams.

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

  The DNS name of the remote host to which you intend send data. The port number on the remote host to which you intend to send data.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  This method is called by the public Dispose() method and the method. Dispose() invokes the protected Dispose(Boolean) method with the parameter set to true. invokes Dispose with set to false.

  When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose() method of each referenced object.

  Releases the unmanaged resources used by the and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  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 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.

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

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method withdraws the from the multicast group identified by the specified . After calling the method, the underlying sends an Internet Group Management Protocol (IGMP) packet to the router, removing the router from the multicast group. After a withdraws from the group, it will no longer be able to receive datagrams sent to that group.

  If you receive a , use 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.

  Leaves a multicast group.

  The of the multicast group to leave.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method withdraws the from the multicast group identified by the specified . After calling the method, the underlying sends an Internet Group Management Protocol (IGMP) packet to the router, removing the router from the multicast group. After a withdraws from the group, it will no longer be able to receive datagrams sent to that group.

  If you receive a , use the 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.

  Leaves a multicast group.

  The of the multicast group to leave. The local address of the multicast group to leave.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  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.

  Gets or sets a value that specifies whether the may send or receive broadcast packets.

- Method
  2.0.0.0
  4.0.0.0
  System.Byte[] `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  This method blocks until the operation is complete.

  To perform this operation synchronously, use the method.

  Ends a pending asynchronous send.

  If successful, the number of bytes sent to the .

  An object returned by a call to .
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  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 property to prevent multiple clients from using a specific port.

  This property must be set before the underlying socket is bound to a client port. If you call , , , or , the client port is bound as a side effect of the constructor, and you cannot subsequently set the property

  Gets or sets a value that specifies whether the allows only one client to use a port.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method subscribes the to a multicast group using the specified . After calling the method, the underlying 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, will throw a . If you receive a , use 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 is listed with the router as a member of the multicast group, it will be able to receive multicasted datagrams sent to the specified .

  You must create the using the multicast port number; otherwise, you will not be able to receive multicasted datagrams. Do not call the method prior to calling the method, or the method will not work. You do not need to belong to a multicast group to send datagrams to a multicast IP address.

  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.

  To stop receiving multicasted datagrams, call the method and provide the of the group from which you would like to withdraw.

  In the IPv6 case, there are several multicast address ranges you can choose from. Please, refer to the IETF RFC 2375.

  You cannot call on a constructed without a specific local port (that is, using the or constructor).

  Adds a to a multicast group.

  The multicast of the group you want to join.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  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.

  The parameter is used to identify a hardware interface on the same link.

  There are several multicast address ranges to choose from. Refer to the IETF RFC 2375.

  You cannot call on a constructed without a specific local port (that is, using the or constructor).

  Adds a to a multicast group.

  The interface index associated with the local IP address on which to join the multicast group. The multicast of the group you want to join.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method subscribes the to a multicast group using the specified . After calling the method, the underlying 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, will throw a . If you receive a , use 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 parameter specifies how many router hops will be allowed for a multicasted datagram before being discarded. Once the is listed with the router as a member of the multicast group, it will be able to receive multicasted datagrams sent to the specified .

  You must create the using the multicast port number otherwise you will not be able to receive multicasted datagrams. Do not call the method prior to calling the 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.

  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.

  To stop receiving multicasted datagrams, call the method and provide the of the group from which you would like to withdraw.

  You cannot call on a constructed without a specific local port (that is, using the or constructor).

  Adds a to a multicast group with the specified Time to Live (TTL).

  The of the multicast group to join. The Time to Live (TTL), measured in router hops.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  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.

  There are several multicast address ranges to choose from. You can find them in the IETF RFC 2375.

  You cannot call on a constructed without a specific local port (that is, using the or constructor).

  Adds a to a multicast group.

  The multicast of the group you want to join. The local .
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  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.

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

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Byte[] `` To be added: an object of type 'Net.IPEndPoint&' To be added To be added: an object of type 'byte []' To be added
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Net.Sockets.UdpReceiveResult>

  This operation will not block. The returned > object will complete after the UDP packet has been received.

  If you specify a default remote host in the method, this method will accept datagrams from that host only. All other datagrams will be discarded.

  If you receive a , use 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.

  If you intend to receive multicasted datagrams, do not call the method prior to calling this method. The you use to receive datagrams must be created using the multicast port number.

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

  Returns .

  The task object representing the asynchronous operation.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` ``

  This overload sends datagrams to the remote host established in the method and returns the number of bytes sent. If you do not call before calling this overload, the method will throw a . If you receive a , use 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.

  If you want to send datagrams to a different remote host, you must call the method and specify the desired remote host. Use either of the other method overloads to send datagrams to a broadcast address.

  Sends a UDP datagram to a remote host.

  The number of bytes sent.

  An array of type that specifies the UDP datagram that you intend to send represented as an array of bytes. The number of bytes in the datagram.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  The method sends datagrams to the specified endpoint and returns the number of bytes successfully sent. Before calling this overload, you must first create an 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 for the property of the . After you have created this , pass it to the method as the parameter.

  If you want to send datagrams to any other broadcast address, use the method to obtain the underlying , and set the socket option to . You can also revert to using the class.

  Do not provide an parameter to this method if you have already established a remote host with the method. If you do, the method will throw a . If you receive a , use 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.

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

  The number of bytes sent.

  An array of type that specifies the UDP datagram that you intend to send, represented as an array of bytes. The number of bytes in the datagram. An that represents the host and port to which to send the datagram.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` `` ``

  The method sends datagrams to the values specified by the and 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 parameter value.

  If you want to send datagrams to any other broadcast address, use the method to obtain the underlying , and set the socket option to . You can also revert to using the class.

  Do not provide a host name or port number to this method if you have already established a remote host with the method. If you do, the method will throw a . If you receive a , use 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.

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

  The number of bytes sent.

  An array of type that specifies the UDP datagram that you intend to send represented as an array of bytes. The number of bytes in the datagram. The name of the remote host to which you intend to send the datagram. The remote port number with which you intend to communicate.
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Int32> `` ``

  This overload sends datagrams to the remote host established in the method. If you do not call before calling this overload, the method will throw a . If you receive a , use 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.

  If you want to send datagrams to a different remote host, you must call the method and specify the desired remote host. Use either of the other method overloads to send datagrams to a broadcast address.

  Sends a UDP datagram asynchronously to a remote host.

  Returns .

  An array of type that specifies the UDP datagram that you intend to send represented as an array of bytes. The number of bytes in the datagram.
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Int32> `` `` ``

  This method sends datagrams to the specified endpoint. Before calling this overload, you must first create an 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 for the property of the . After you have created this , pass it to this method as the parameter.

  If you want to send datagrams to any other broadcast address, use the method to obtain the underlying , and set the socket option to . You can also revert to using the class.

  Do not provide an parameter to this method if you have already established a remote host with the method. If you do, this method will throw a . If you receive a , use 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.

  Sends a UDP datagram asynchronously to a remote host.

  Returns .

  An array of type that specifies the UDP datagram that you intend to send represented as an array of bytes. The number of bytes in the datagram. An that represents the host and port to which to send the datagram.
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Int32> `` `` `` ``

  This method sends datagrams to the values specified by the and parameters. You can send datagrams to the default broadcast address by specifying "255.255.255.255" for the parameter value.

  If you want to send datagrams to any other broadcast address, use the method to obtain the underlying , and set the socket option to . You can also revert to using the class.

  Do not provide a host name or port number to this method if you have already established a remote host with the method. If you do, this method will throw a . If you receive a , use 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.

  Sends a UDP datagram asynchronously to a remote host.

  Returns .

  An array of type that specifies the UDP datagram that you intend to send represented as an array of bytes. The number of bytes in the datagram. The name of the remote host to which you intend to send the datagram. The remote port number with which you intend to communicate.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

  Note: Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's Finalize method.

  Releases all resources used by the .

- Property
  2.0.0.0
  4.0.0.0
  System.Int16 To be added.

  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.

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