Share via


UdpAnySourceMulticastClient.BeginSendToGroup Metodo

Definizione

Attenzione

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Avvia l'operazione di invio di un pacchetto a un gruppo multicast unito e richiama il callback specificato dopo che un pacchetto è stato inviato al gruppo.

public:
 IAsyncResult ^ BeginSendToGroup(cli::array <System::Byte> ^ buffer, int offset, int count, 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 BeginSendToGroup (byte[] buffer, int offset, int count, AsyncCallback callback, object state);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.BeginSendToGroup : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Function BeginSendToGroup (buffer As Byte(), offset As Integer, count As Integer, callback As AsyncCallback, state As Object) As IAsyncResult

Parametri

buffer
Byte[]

Buffer che contiene i dati da inviare.

offset
Int32

Offset, in byte, dall'inizio del buffer per leggere i dati da inviare.

count
Int32

Numero di byte da inviare da buffer.

callback
AsyncCallback

Metodo di callback da richiamare al completamento dell'operazione.

state
Object

Informazioni di stato facoltative da passare al metodo callback per l'operazione.

Restituisce

IAsyncResult che fa riferimento a questa operazione.

Attributi

Eccezioni

buffer è un riferimento null (Nothing in Visual Basic).

offset è minore di 0.

-oppure-

offset è maggiore della lunghezza di buffer.

-oppure-

count è minore di 0.

-oppure-

offset più il conteggio è maggiore della lunghezza di buffer.

Il gruppo multicast non è ancora stato unito.

L'interfaccia UdpAnySourceMulticastClient è stata eliminata.

Si è verificato un errore durante il tentativo di accesso al socket.

Commenti

Il BeginSendToGroup metodo inizia un'operazione di invio di un pacchetto UDP al gruppo multicast aggiunto.

Il client deve aver completato un join al gruppo multicast.

Il metodo specificato nel callback parametro viene richiamato quando viene ricevuto un pacchetto.

È possibile avere un errore di socket se un'operazione di ricezione ha esito sincrono, anche se questa operazione non è comune con UDP. Se si verifica un errore socket, viene generato un SocketException oggetto . L'errore ricevuto viene specificato come membro dell'enumerazione SocketError .

Si applica a