Begins the operation of sending a unicast packet to the specified destination.
Assembly: System.Net (in System.Net.dll)
'Declaration <SecuritySafeCriticalAttribute> _ Public Function BeginSendTo ( _ buffer As Byte(), _ offset As Integer, _ count As Integer, _ remoteEndPoint As IPEndPoint, _ callback As AsyncCallback, _ state As Object _ ) As IAsyncResult
- Type: System.Byte()
The buffer that contains the data to send.
- Type: System.Int32
The offset, in bytes, from the beginning of the buffer to read the data to be sent.
- Type: System.Int32
The number of bytes to send from the buffer.
- Type: System.Net.IPEndPoint
The remote endpoint to which the packet is to be sent.
- Type: System.AsyncCallback
The callback method to invoke when the operation completes.
- Type: System.Object
Optional state information to pass to the callback method for this operation.
buffer is Nothing.
offset is less than 0
offset is greater than the length of the buffer.
count is less than 0
offset plus the count is greater than the length of the buffer.
The multicast group has not yet been joined.
The UdpAnySourceMulticastClient has been disposed.
An error occurred when attempting to access the socket for sending. See the Remarks section for more information.
The method begins an operation of sending a UDP packet to the joined multicast group.
The client must have completed a join to the multicast group. The destination address specified in the remoteEndPoint parameter must have already sent a multicast packet to this receiver. Some protocols use this information to pass along flow control, quality of service statistics, or recovery messages.
The method specified in the callback parameter is invoked when a packet has been sent.
The transmission is only allowed if the address specified in the remoteEndPoint parameter has already sent a multicast packet to this receiver. If the client is not allowed access, a SocketException is thrown with SocketError.AccessDenied.
It is possible to have a socket failure if a send operation fails synchronously, although this is uncommon with UDP. If a socket failure occurs, a SocketException is thrown. The error received is specified as a member of the System.Net.Sockets.SocketError enumeration.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.