UdpSingleSourceMulticastClient.BeginReceiveFromSource 메서드

정의

주의

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

조인된 멀티캐스트 그룹에서 패킷을 받는 작업을 시작하고 지정된 보낸 사람의 패킷이 그룹에 도착할 때 지정된 콜백을 호출합니다.

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

매개 변수

buffer
Byte[]

받은 데이터를 저장할 버퍼입니다.

offset
Int32

buffer 시작부터 데이터를 저장해야 하는 오프셋(바이트)입니다.

count
Int32

buffer에서 받고 저장할 최대 바이트 수입니다.

callback
AsyncCallback

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

state
Object

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

반환

IAsyncResult

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

특성

예외

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

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

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

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

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

설명

BeginReceiveFromSource 메서드 단일 발신자에서 조인된 된 멀티 캐스트 그룹에서 UDP 패킷을 받는 작업을 시작 합니다. 로컬 포트, 멀티 캐스트 그룹 및 발신자 원본 주소에 지정 된 된 UdpSingleSourceMulticastClient 생성자입니다. 멀티 캐스트 클라이언트도 완료 해야 멀티 캐스트 그룹에 조인 합니다.

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

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

적용 대상