Beispiel #1
0
        public ZerioServer(int listeningPort, ZerioServerConfiguration serverConfiguration = null)
        {
            WinSock.EnsureIsInitialized();

            _listeningPort = listeningPort;

            _configuration    = CreateConfiguration(serverConfiguration);
            _completionQueues = CreateCompletionQueues();
            _sessionManager   = CreateSessionManager();

            _sendRequestProcessingEngine = CreateSendRequestProcessingEngine();
            _receiveCompletionProcessor  = CreateReceiveCompletionProcessor();

            _listeningSocket = CreateListeningSocket();
        }
Beispiel #2
0
 private static InternalZerioConfiguration CreateConfiguration(ZerioServerConfiguration serverConfiguration)
 {
     serverConfiguration ??= new ZerioServerConfiguration();
     return(serverConfiguration.ToInternalConfiguration());
 }