public AsyncSocketServer(int numConnections) { m_numConnections = numConnections; m_receiveBufferSize = ProtocolConst.ReceiveBufferSize; m_asyncSocketUserTokenPool = new AsyncSocketUserTokenPool(numConnections); LogOutputSocketProtocolMgr = new LogOutputSocketProtocolMgr(); AsyncSocketUserTokenList = new AsyncSocketUserTokenList(); m_maxNumberAcceptedClients = new Semaphore(numConnections, numConnections); UploadSocketProtocolMgr = new UploadSocketProtocolMgr(); }
public AsyncSocketServer(int numConnections, int port) { m_numConnections = numConnections; m_port = port; m_receiveBufferSize = ProtocolConst.ReceiveBufferSize; m_asyncSocketUserTokenPool = new AsyncSocketUserTokenPool(numConnections); m_asyncSocketUserTokenList = new AsyncSocketUserTokenList(); m_maxNumberAcceptedClients = new Semaphore(numConnections, numConnections); m_uploadSocketProtocolMgr = new UploadSocketProtocolMgr(); m_downloadSocketProtocolMgr = new DownloadSocketProtocolMgr(); }