IPEndPoint.Create(SocketAddress) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
소켓 주소에서 엔드포인트를 만듭니다.
public:
override System::Net::EndPoint ^ Create(System::Net::SocketAddress ^ socketAddress);
public override System.Net.EndPoint Create(System.Net.SocketAddress socketAddress);
override this.Create : System.Net.SocketAddress -> System.Net.EndPoint
Public Overrides Function Create (socketAddress As SocketAddress) As EndPoint
매개 변수
- socketAddress
- SocketAddress
SocketAddress 엔드포인트에 사용할 대상입니다.
반품
EndPoint 지정된 소켓 주소를 사용하는 인스턴스입니다.
예외
AddressFamily가 socketAddress 현재 인스턴스의 AddressFamily와 같지 않습니다.
-또는-
socketAddress. 크기 < 8.
예제
다음 예제에서는 지정된 SocketAddress 을 사용하여 .를 만듭니다 IPEndPoint.
// Recreate the connection endpoint from the serialized information.
IPEndPoint endpoint = new IPEndPoint(0,0);
IPEndPoint clonedIPEndPoint = (IPEndPoint) endpoint.Create(socketAddress);
Console.WriteLine("clonedIPEndPoint: " + clonedIPEndPoint.ToString());
' Recreate the connection endpoint from the serialized information.
Dim endpoint As New IPEndPoint(0, 0)
Dim clonedIPEndPoint As IPEndPoint = CType(endpoint.Create(socketAddress), IPEndPoint)
Console.WriteLine(("clonedIPEndPoint: " + clonedIPEndPoint.ToString()))