示例#1
0
 public TThreadPoolServer(Processor processor, ServerTransport serverTransport, LogDelegate logDelegate)
     : this(processor, serverTransport,
          new TransportFactory(), new TransportFactory(),
          new BinaryProtocol.Factory(), new BinaryProtocol.Factory(),
          DEFAULT_MIN_THREADS, DEFAULT_MAX_THREADS, logDelegate)
 {
 }
示例#2
0
 public TThreadedServer(Processor processor, ServerTransport serverTransport)
     : this(processor, serverTransport,
          new TransportFactory(), new TransportFactory(),
          new BinaryProtocol.Factory(), new BinaryProtocol.Factory(),
          DEFAULT_MAX_THREADS, DefaultLogDelegate)
 {
 }
示例#3
0
 public TThreadPoolServer(Processor processor,
                          ServerTransport serverTransport,
                          TransportFactory transportFactory,
                          ProtocolFactory protocolFactory)
     : this(processor, serverTransport,
          transportFactory, transportFactory,
          protocolFactory, protocolFactory,
          DEFAULT_MIN_THREADS, DEFAULT_MAX_THREADS, DefaultLogDelegate)
 {
 }
示例#4
0
 public TSimpleServer(Processor processor,
                   ServerTransport serverTransport,
                   TransportFactory transportFactory)
     : base(processor,
          serverTransport,
          transportFactory,
          transportFactory,
          new BinaryProtocol.Factory(),
          new BinaryProtocol.Factory(),
          DefaultLogDelegate)
 {
 }
示例#5
0
 public TSimpleServer(Processor processor,
                   ServerTransport serverTransport,
                   TransportFactory transportFactory,
                   ProtocolFactory protocolFactory)
     : base(processor,
          serverTransport,
          transportFactory,
          transportFactory,
          protocolFactory,
          protocolFactory,
          DefaultLogDelegate)
 {
 }
示例#6
0
 public TThreadedServer(Processor processor,
                          ServerTransport serverTransport,
                          TransportFactory inputTransportFactory,
                          TransportFactory outputTransportFactory,
                          ProtocolFactory inputProtocolFactory,
                          ProtocolFactory outputProtocolFactory,
                          int maxThreads, LogDelegate logDel)
     : base(processor, serverTransport, inputTransportFactory, outputTransportFactory,
           inputProtocolFactory, outputProtocolFactory, logDel)
 {
     this.maxThreads = maxThreads;
     clientQueue = new Queue<TTransport>();
     clientLock = new object();
     clientThreads = new THashSet<Thread>();
 }
示例#7
0
 public TThreadPoolServer(Processor processor,
                          ServerTransport serverTransport,
                          TransportFactory inputTransportFactory,
                          TransportFactory outputTransportFactory,
                          ProtocolFactory inputProtocolFactory,
                          ProtocolFactory outputProtocolFactory,
                          int minThreadPoolThreads, int maxThreadPoolThreads, LogDelegate logDel)
     : base(processor, serverTransport, inputTransportFactory, outputTransportFactory,
           inputProtocolFactory, outputProtocolFactory, logDel)
 {
     lock (typeof(TThreadPoolServer))
       {
     if (!ThreadPool.SetMinThreads(minThreadPoolThreads, minThreadPoolThreads))
     {
       throw new Exception("Error: could not SetMinThreads in ThreadPool");
     }
     if (!ThreadPool.SetMaxThreads(maxThreadPoolThreads, maxThreadPoolThreads))
     {
       throw new Exception("Error: could not SetMaxThreads in ThreadPool");
     }
     }
 }
示例#8
0
 public TSimpleServer(Processor processor,
                     ServerTransport serverTransport,
                     LogDelegate logDel)
     : base(processor, serverTransport, new TransportFactory(), new TransportFactory(), new BinaryProtocol.Factory(), new BinaryProtocol.Factory(), logDel)
 {
 }
示例#9
0
文件: Server.cs 项目: tritao/flood
 public Server(Processor processor,
                 ServerTransport serverTransport,
                 LogDelegate logDelegate)
     : this(processor, serverTransport, new TransportFactory(), new TransportFactory(), new BinaryProtocol.Factory(), new BinaryProtocol.Factory(), DefaultLogDelegate)
 {
 }
示例#10
0
文件: Server.cs 项目: tritao/flood
 public Server(Processor processor,
                   ServerTransport serverTransport,
                   TransportFactory inputTransportFactory,
                   TransportFactory outputTransportFactory,
                   ProtocolFactory inputProtocolFactory,
                   ProtocolFactory outputProtocolFactory,
                   LogDelegate logDelegate)
 {
     this.processor = processor;
     this.serverTransport = serverTransport;
     this.inputTransportFactory = inputTransportFactory;
     this.outputTransportFactory = outputTransportFactory;
     this.inputProtocolFactory = inputProtocolFactory;
     this.outputProtocolFactory = outputProtocolFactory;
     this.logDelegate = logDelegate;
 }