Any Source Multicast Client. Begin Send To(Byte, Int32, Int32, IPEndPoint, AsyncCallback, Object) Method
This API is now obsolete.
Begins the operation of sending a unicast packet to the specified destination.
public: IAsyncResult ^ BeginSendTo(cli::array <System::Byte> ^ buffer, int offset, int count, System::Net::IPEndPoint ^ remoteEndPoint, AsyncCallback ^ callback, System::Object ^ state);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] public IAsyncResult BeginSendTo (byte buffer, int offset, int count, System.Net.IPEndPoint remoteEndPoint, AsyncCallback callback, object state);
member this.BeginSendTo : byte * int * int * System.Net.IPEndPoint * AsyncCallback * obj -> IAsyncResult
Public Function BeginSendTo (buffer As Byte(), offset As Integer, count As Integer, remoteEndPoint As IPEndPoint, callback As AsyncCallback, state As Object) As IAsyncResult
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
The remote endpoint to which the packet is to be sent.
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
count is less than 0
offset plus the count is greater than the length of the
The multicast group has not yet been joined.
An error occurred when attempting to access the socket.
The BeginSendTo 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 received.
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 AccessDenied.
It is possible to have a socket failure if a receive 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.