UdpSingleSourceMulticastClient.BeginSendToSource Method (Byte, Int32, Int32, Int32, AsyncCallback, Object)
Begins the operation of sending a unicast packet to the source previously specified.
Assembly: System.Net (in System.Net.dll)
[ObsoleteAttribute("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] public IAsyncResult BeginSendToSource( byte buffer, int offset, int count, int remotePort, AsyncCallback callback, object state )
The buffer that contains the data to send.
The offset, in bytes, from the beginning of the buffer to read the data to be sent.
The number of bytes to send from the buffer.
The remote port to which the packet is to be sent. The remote address is specified by the UdpSingleSourceMulticastClient constructor.
The callback method to invoke when the operation completes.
Optional state information to pass to the callback method for this operation.
buffer is a null reference (Nothing in Visual Basic).
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.
remotePort is less than 0 or greater than 65,535.
The multicast group has not yet been joined.
The UdpSingleSourceMulticastClient has been disposed.
An error occurred when attempting to access the socket. See the Remarks section for more information.
Themethod begins an operation of sending a UDP packet to the source previously specified.
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 client must have completed a join to the multicast group.
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 SocketError enumeration.
Available since 4.5
Available since 4.0
Windows Phone Silverlight
Available since 7.1