UdpAnySourceMulticastClient.BeginSendTo 메서드

정의

주의

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

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

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);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
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

매개 변수

buffer
Byte[]

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

offset
Int32

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

count
Int32

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

remoteEndPoint
IPEndPoint

패킷을 보내야 하는 원격 엔드포인트입니다.

callback
AsyncCallback

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

state
Object

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

반환

IAsyncResult

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

특성

예외

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

offset가 0보다 작습니다. 또는 offsetbuffer의 길이보다 큽니다.

또는 count가 0보다 작습니다. 또는 offset + 개수가 buffer의 길이보다 큽니다.

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

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

설명

BeginSendTo 메서드 조인된 된 멀티 캐스트 그룹에 UDP 패킷을 보내는 작업을 시작 합니다.

클라이언트가 멀티 캐스트 그룹에 조인을 완료 해야 합니다. 에 지정 된 대상 주소는 remoteEndPoint 매개 변수 해야 이미 전송 멀티 캐스트 패킷을이 수신자에 게 합니다. 일부 프로토콜 흐름 제어, 서비스 통계 또는 복구 메시지의 품질을 전달 하려면이 정보를 사용 합니다.

에 지정 된 메서드는 callback 패킷을 받으면 매개 변수를 호출 합니다.

주소에 지정 된 경우에 전송 허용 됩니다는 remoteEndPoint 매개 변수가 이미이 수신기에 멀티 캐스트 패킷을 전송 합니다. 클라이언트 액세스를 허용 되지 않는 경우는 SocketException 이 throw AccessDenied합니다.

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

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

적용 대상