HttpListenerRequest.LocalEndPoint 속성

정의

요청이 전달되는 서버 IP 주소 및 포트 번호를 가져옵니다.

public:
 property System::Net::IPEndPoint ^ LocalEndPoint { System::Net::IPEndPoint ^ get(); };
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public System.Net.IPEndPoint LocalEndPoint { get; }
public System.Net.IPEndPoint LocalEndPoint { get; }
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.LocalEndPoint : System.Net.IPEndPoint
member this.LocalEndPoint : System.Net.IPEndPoint
Public ReadOnly Property LocalEndPoint As IPEndPoint

속성 값

IPEndPoint

요청이 보내지는 IP 주소를 나타내는 IPEndPoint입니다.

특성

예제

다음 코드 예제에서는이 속성을 사용 하 여 보여 줍니다.

public static void ShowRequestProperties2 (HttpListenerRequest request)
{
    Console.WriteLine("KeepAlive: {0}", request.KeepAlive);
    Console.WriteLine("Local end point: {0}", request.LocalEndPoint.ToString());
    Console.WriteLine("Remote end point: {0}", request.RemoteEndPoint.ToString());
    Console.WriteLine("Is local? {0}", request.IsLocal);
    Console.WriteLine("HTTP method: {0}", request.HttpMethod);
    Console.WriteLine("Protocol version: {0}", request.ProtocolVersion);
    Console.WriteLine("Is authenticated: {0}", request.IsAuthenticated);
    Console.WriteLine("Is secure: {0}", request.IsSecureConnection);
}
Public Shared Sub ShowRequestProperties2(ByVal request As HttpListenerRequest)
    Console.WriteLine("KeepAlive: {0}", request.KeepAlive)
    Console.WriteLine("Local end point: {0}", request.LocalEndPoint.ToString())
    Console.WriteLine("Remote end point: {0}", request.RemoteEndPoint.ToString())
    Console.WriteLine("Is local? {0}", request.IsLocal)
    Console.WriteLine("HTTP method: {0}", request.HttpMethod)
    Console.WriteLine("Protocol version: {0}", request.ProtocolVersion)
    Console.WriteLine("Is authenticated: {0}", request.IsAuthenticated)
    Console.WriteLine("Is secure: {0}", request.IsSecureConnection)
End Sub

설명

이 속성은 주소 지정 방법에 따라 요청에 응답하려는 경우에 유용합니다.

적용 대상

추가 정보