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 )ipThe IP address of the endpoint in text format (string format).addressThe IP address of the endpoint.portThe port number of the endpoint.endpointIdentifies a network address. This is anabstractclass.ipEndpointRepresents a network endpoint as anIP addressand aport number.
Properties
-
Return default Host instance, the default host is (0.0.0:0).Host Default
-
Return IPAddress (The IP address of the endpoint).IPAddress Address
-
Return Port (The port number of the endpoint).int Port
-
Return AddressFamily (Specifies the addressing scheme that an instance of the Socket class can use).AddressFamily AddressFamily
-
Return EndPoint (Identifies a network address. This is anEndPoint EndPointabstractclass).
-
Return IPEndPoint (Represents a network endpoint as anIPEndPoint IPEndPointIP addressand aport number).
Methods
-
Return the value of endpoint as stringstring ToString()IPAddress:PortHost host = new Host("127.0.0.1", 8080);
string value = host.ToString();
// The value is: "127.0.0.1:8080"