示例#1
0
        public Scheduler(string path, Bamboo.Threading.ThreadPool threadPool, Bamboo.Sql2.Database database)
        {
            this._path       = path;
            this._threadPool = threadPool;
            this._database   = database;

            this._method = typeof(Scheduler).GetMethod("ExecuteJob");

            this._thread = new System.Threading.Thread(Run);
            this._thread.Start();
        }
示例#2
0
        public TcpServer(int port, Bamboo.Threading.ThreadPool threadPool, TcpProcessor processor)
        {
            this._threadPool = threadPool;
            this._processor  = processor;
            this._method     = processor.GetType().GetMethod("Process");

            this._socket = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp);
            this._socket.Bind(new System.Net.IPEndPoint(System.Net.IPAddress.Any, port));
            this._socket.Listen((int)System.Net.Sockets.SocketOptionName.MaxConnections);

            this._thread = new System.Threading.Thread(Run);
            this._thread.Start();
        }
示例#3
0
 public HttpServer(int port, Bamboo.Threading.ThreadPool threadPool, Bamboo.DataStructures.BufferPool bufferPool)
 {
     this._dictionaryHttpProcessor = new DictionaryHttpProcessor(bufferPool);
     this._errorHttpProcessor      = new ErrorHttpProcessor(this._dictionaryHttpProcessor, bufferPool);
     this._tcpServer = new TcpServer(port, threadPool, this._errorHttpProcessor);
 }