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(); }
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(); }
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); }