Naanou.Common
Class NetworkInfo

Provides information about the environment's networking capabilities and settings. Uses Microsoft's NetSamples assembly

Field Summary
System.Collections.ArrayList gateways
System.Collections.ArrayList localAddresses

Constructor Summary
NetworkInfo()
        Initializes a new instance of the NetworkInfo class.

Method Summary
void GetDetails()
string LocalAddress()
         Gets the first local address for this machine (or loopback if nothing found)
System.Net.IPEndPoint[] LocalEndPoints(int port)
         Returns an array of IPEndPoints for each local address on machine

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

gateways

private System.Collections.ArrayList gateways


localAddresses

private System.Collections.ArrayList localAddresses

Constructor Detail

NetworkInfo

public NetworkInfo()

Initializes a new instance of the NetworkInfo class.

Method Detail

GetDetails

private void GetDetails()


LocalAddress

public string LocalAddress()

Gets the first local address for this machine (or loopback if nothing found)

Returns:
Local address

LocalEndPoints

public System.Net.IPEndPoint[] LocalEndPoints(int port)

Returns an array of IPEndPoints for each local address on machine

Parameters:
port - Port we want
Returns:
End points