UdpSingleSourceMulticastClient.BeginSendToSource 메서드

정의

주의

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

이전에 지정된 소스에 유니캐스트 패킷을 보내는 작업을 시작합니다.

public:
 IAsyncResult ^ BeginSendToSource(cli::array <System::Byte> ^ buffer, int offset, int count, int remotePort, 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 BeginSendToSource (byte[] buffer, int offset, int count, int remotePort, 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.BeginSendToSource : byte[] * int * int * int * AsyncCallback * obj -> IAsyncResult
Public Function BeginSendToSource (buffer As Byte(), offset As Integer, count As Integer, remotePort As Integer, callback As AsyncCallback, state As Object) As IAsyncResult

매개 변수

buffer
Byte[]

보낼 데이터가 들어 있는 버퍼입니다.

offset
Int32

buffer 시작부터 보낼 데이터를 읽을 오프셋(바이트)입니다.

count
Int32

buffer에서 보낼 바이트 수입니다.

remotePort
Int32

패킷을 보내야 하는 원격 포트입니다. 원격 주소는 UdpSingleSourceMulticastClient(IPAddress, IPAddress, Int32) 생성자에서 지정됩니다.

callback
AsyncCallback

작업이 완료될 때 호출할 콜백 메서드입니다.

state
Object

이 작업의 callback 메서드에 전달할 선택적 상태 정보입니다.

반환

이 작업을 참조하는 IAsyncResult입니다.

특성

예외

buffer가 null 참조(Visual Basic의 경우 Nothing)인 경우

offset가 0보다 작습니다.

또는

offsetbuffer의 길이보다 큽니다.

또는

count가 0보다 작습니다.

또는

offset + 개수가 buffer의 길이보다 큽니다.

또는

remotePort가 0보다 작거나 65,535보다 큽니다.

멀티캐스트 그룹이 아직 조인되지 않았습니다.

소켓에 액세스하는 동안 오류가 발생했습니다.

설명

BeginSendToSource 메서드 이전에 지정한 원본에 UDP 패킷을 보내는 작업을 시작 합니다.

일부 프로토콜 흐름 제어, 서비스 통계 또는 복구 메시지의 품질을 전달 하려면이 정보를 사용 합니다.

에 지정 된 메서드는 callback 패킷이 전송 되 면 매개 변수를 호출 합니다.

클라이언트가 멀티 캐스트 그룹에 조인을 완료 해야 합니다.

대상 포트에 지정 된 경우는 remotePort 매개 변수는 1024 보다 작은 SocketException 이 throw 됩니다 AccessDenied합니다.

UDP를 사용 하 여 일반적인 아니지만 보내기 작업이 동기적으로 실패 하면 소켓 오류가 있을 수는 것입니다. 소켓 오류가 발생 하는 경우는 SocketException throw 됩니다. 구성원으로 지정 된 오류가 SocketError 열거형입니다.

적용 대상