Exemplo n.º 1
0
        public ZerioClient(IPEndPoint serverEndpoint, ZerioClientConfiguration clientConfiguration = null)
        {
            _serverEndpoint = serverEndpoint;

            WinSock.EnsureIsInitialized();

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

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

            _session = _sessionManager.Acquire();
            _session.HandshakeReceived += OnHandshakeReceived;
            _session.Closed            += OnSessionClosed;
        }
Exemplo n.º 2
0
 private static InternalZerioConfiguration CreateConfiguration(ZerioClientConfiguration clientConfiguration)
 {
     clientConfiguration ??= new ZerioClientConfiguration();
     return(clientConfiguration.ToInternalConfiguration());
 }