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;
}