Helper
Namespace: EasyCommunication.Helper
Assembly: EasyCommunication.dll
Syntax
public static class Helper
Methods
GetIPAndPort(Nullable<Connection>)
Combines Connection into a IPAddress:Port string
Declaration
public static string GetIPAndPort(this Connection? connection)
Parameters
Type
Name
Description
Returns
Type
Description
System.String
Connection's IPAddress:Port string
Remarks
GetIPv4(TcpClient)
Gets the TcpClient's IPv4 Address
Declaration
public static string GetIPv4(this TcpClient client)
Parameters
Type
Name
Description
System.Net.Sockets.TcpClient
client
Returns
Type
Description
System.String
TcpClient's IPv4 Address
GetIPv4(TcpListener)
Gets the TcpListener's IPv4 Address
Declaration
public static string GetIPv4(this TcpListener listener)
Parameters
Type
Name
Description
System.Net.Sockets.TcpListener
listener
Returns
Type
Description
System.String
TcpListener's IPv4 Address
GetPort(TcpClient)
Gets the TcpClient's port
Declaration
public static int GetPort(this TcpClient client)
Parameters
Type
Name
Description
System.Net.Sockets.TcpClient
client
Returns
Type
Description
System.Int32
TcpClient's port
GetPort(TcpListener)
Gets the TcpListener's port
Declaration
public static int GetPort(this TcpListener listener)
Parameters
Type
Name
Description
System.Net.Sockets.TcpListener
listener
Returns
Type
Description
System.Int32
TcpListener's port
Last updated
Was this helpful?