TrotiNet.TcpServer.TcpServer C# (CSharp) Method

TcpServer() public method

Initialize, but do not start, a multi-threaded TCP server listening for localhost connections only
public TcpServer ( int localPort, bool bUseIPv6 ) : System
localPort int TCP port to listen to
bUseIPv6 bool /// If true, listen on ::1 only. If false, listen on 127.0.0.1 only. ///
return System
        public TcpServer(int localPort, bool bUseIPv6)
        {
            if (localPort < 1)
                throw new ArgumentException("localPort");

            LocalPort = localPort;
            UseIPv6 = bUseIPv6;

            ConnectedSockets = new Dictionary<int, HttpSocket>();
            InitListenFinished = new ManualResetEvent(false);
            ListenThreadSwitch = new ManualResetEvent(false);
            ListeningThread = null;
        }