UdpAnySourceMulticastClient.BlockSource(IPAddress) 메서드

정의

주의

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

원본에서 시작된 멀티캐스트 패킷이 더 이상 수신되지 않도록 원본을 차단합니다.

public:
 void BlockSource(System::Net::IPAddress ^ sourceAddress);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public void BlockSource(System.Net.IPAddress sourceAddress);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.BlockSource : System.Net.IPAddress -> unit
Public Sub BlockSource (sourceAddress As IPAddress)

매개 변수

sourceAddress
IPAddress

차단할 원본의 주소입니다.

특성

예외

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

소켓에 액세스하려고 할 때 오류가 발생했습니다.

설명

이 메서드는 BlockSource 지정된 원본 주소에서 발생하는 멀티캐스트 패킷이 수신되지 않도록 차단합니다. 클라이언트가 멀티캐스트 그룹에 대한 조인을 완료해야 합니다.

매개 변수는 sourceAddress IPv6 또는 IPv4 주소일 수 있지만 매개 변수는 sourceAddress 클라이언트가 조인한 멀티캐스트 그룹의 주소 패밀리와 일치해야 합니다.

매개 변수에 callback 지정된 메서드는 패킷이 수신될 때 호출됩니다.

블록 소스 작업을 수행하는 동안 소켓 오류가 발생하면 throw SocketException 됩니다. 수신된 오류는 열거형의 SocketError 멤버로 지정됩니다.

적용 대상