Example #1
0
 public AsyncBaseServer(ITAsyncProcessor processor, TServerTransport serverTransport,
     ITProtocolFactory inputProtocolFactory, ITProtocolFactory outputProtocolFactory,
     ILoggerFactory loggerFactory, int clientWaitingDelay = 10)
     : this(new SingletonTProcessorFactory(processor), serverTransport,
         new TTransportFactory(), new TTransportFactory(),
         inputProtocolFactory, outputProtocolFactory,
         loggerFactory.CreateLogger(nameof(AsyncBaseServer)), clientWaitingDelay)
 {
 }
Example #2
0
 public AsyncBaseServer(ITProcessorFactory itProcessorFactory, TServerTransport serverTransport,
     TTransportFactory inputTransportFactory, TTransportFactory outputTransportFactory,
     ITProtocolFactory inputProtocolFactory, ITProtocolFactory outputProtocolFactory,
     ILogger logger, int clientWaitingDelay = 10)
     : base(itProcessorFactory, serverTransport, inputTransportFactory, outputTransportFactory,
         inputProtocolFactory, outputProtocolFactory, logger)
 {
     _clientWaitingDelay = clientWaitingDelay;
 }
Example #3
0
        protected TBaseServer(ITProcessorFactory itProcessorFactory, TServerTransport serverTransport,
            TTransportFactory inputTransportFactory, TTransportFactory outputTransportFactory,
            ITProtocolFactory inputProtocolFactory, ITProtocolFactory outputProtocolFactory,
            ILogger logger)
        {
            if (itProcessorFactory == null) throw new ArgumentNullException(nameof(itProcessorFactory));
            if (inputTransportFactory == null) throw new ArgumentNullException(nameof(inputTransportFactory));
            if (outputTransportFactory == null) throw new ArgumentNullException(nameof(outputTransportFactory));
            if (inputProtocolFactory == null) throw new ArgumentNullException(nameof(inputProtocolFactory));
            if (outputProtocolFactory == null) throw new ArgumentNullException(nameof(outputProtocolFactory));
            if (logger == null) throw new ArgumentNullException(nameof(logger));

            ItProcessorFactory = itProcessorFactory;
            ServerTransport = serverTransport;
            InputTransportFactory = inputTransportFactory;
            OutputTransportFactory = outputTransportFactory;
            InputProtocolFactory = inputProtocolFactory;
            OutputProtocolFactory = outputProtocolFactory;
            Logger = logger;
        }