Skip to main content
Version: 3.1.0

Host

Netly endpoint metadata

Namespace

using Netly.Core;

Constructors

  • Host Host(string ip, int port)
    Host Host(IPAddress address, int port)
    Host Host(IPEndPoint ipEndpoint)
    Host Host(EndPoint endpoint)
    • ip The IP address of the endpoint in text format (string format).
    • address The IP address of the endpoint.
    • port The port number of the endpoint.
    • endpoint Identifies a network address. This is an abstract class.
    • ipEndpoint Represents a network endpoint as an IP address and a port number.

Properties

  • Host Default
    Return default Host instance, the default host is (0.0.0:0).

  • IPAddress Address
    Return IPAddress (The IP address of the endpoint).

  • int Port
    Return Port (The port number of the endpoint).

  • AddressFamily AddressFamily
    Return AddressFamily (Specifies the addressing scheme that an instance of the Socket class can use).

  • EndPoint EndPoint
    Return EndPoint (Identifies a network address. This is an abstract class).

  • IPEndPoint IPEndPoint
    Return IPEndPoint (Represents a network endpoint as an IP address and a port number).

Methods

  • string ToString()
    Return the value of endpoint as string IPAddress:Port
    Host host = new Host("127.0.0.1", 8080);
    string value = host.ToString();
    // The value is: "127.0.0.1:8080"