Class Network
Assembly: cs.temp.dll.dll
Syntax
public static class Network
Properties
IsLookingForLocalServers
Declaration
public static bool IsLookingForLocalServers { get; }
Property Value
LocalEndpoints
Declaration
public static List<IPEndPoint> LocalEndpoints { get; }
Property Value
Type |
Description |
List<IPEndPoint> |
|
Methods
GetLocalIPs()
Get all the local IPs of this machine by going over every network interface that is active and linked to either wifi or ethernet.
Declaration
public static IPAddress[] GetLocalIPs()
Returns
Type |
Description |
IPAddress[] |
|
RefreshLocalServerListing(CosmosConsole, UInt16, Int32)
A method to find all of the local UDP servers and clients on the network
Declaration
public static bool RefreshLocalServerListing(CosmosConsole console, ushort portNumber, int timeoutMs = 1000)
Parameters
Returns
ResolveHost(String, UInt16, out IPEndPoint)
Declaration
public static bool ResolveHost(string host, ushort port, out IPEndPoint resolvedEndPoint)
Parameters
Type |
Name |
Description |
String |
host |
|
UInt16 |
port |
|
IPEndPoint |
resolvedEndPoint |
|
Returns
Events
OnLocalServerFound
Declaration
public static event Action<IPEndPoint> OnLocalServerFound
Event Type
Type |
Description |
Action<IPEndPoint> |
|