ATMLUtilitiesLibrary.HttpServer.HttpServer C# (CSharp) Метод

HttpServer() публичный Метод

public HttpServer ( int port, object parent ) : System
port int
parent object
Результат System
        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;
                }
            }
        }