Class NetworkEndpoint
This class represents a network endpoint.
Namespace: Evergine.Networking
Assembly: Evergine.Networking.dll
Syntax
public class NetworkEndpoint
Constructors
NetworkEndpoint(string, int)
Initializes a new instance of the NetworkEndpoint class.
Declaration
public NetworkEndpoint(string address, int port)
Parameters
Type | Name | Description |
---|---|---|
string | address | The IP address. |
int | port | The port number. |
Properties
Address
Gets the IP address.
Declaration
public string Address { get; }
Property Value
Type | Description |
---|---|
string |
Port
Gets the port.
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Parse(string)
Converts an IP address string with a port to a NetworkEndpoint instance.
Declaration
public static NetworkEndpoint Parse(string epString)
Parameters
Type | Name | Description |
---|---|---|
string | epString | A string that contains an IP address in dotted-quad notation for IPv4 followed by a colon and the port number. |
Returns
Type | Description |
---|---|
NetworkEndpoint | A NetworkEndpoint instance. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |