public HttpServer( int port, object parent )
{
this.port = port;
this.parent = parent;
IPGlobalProperties ipGlobalProperties = IPGlobalProperties.GetIPGlobalProperties();
IPEndPoint[] tcpConnInfoArray = ipGlobalProperties.GetActiveTcpListeners();
foreach (IPEndPoint endpoint in tcpConnInfoArray)
{
if (endpoint.Port == port)
{
error = "Port " + port + " is unavailable";
is_active = false;
break;
}
}
}