示例#1
0
 public function __construct($port, $timeout, $max_connection)
 {
     parent::__construct();
     $this->_address = null;
     $this->_port = $port;
     $this->_timeout = $timeout;
     $this->_max_connection = $max_connection;
     $this->_last_time = time();
     $this->_socket = null;
     $this->_clients = array();
 }
示例#2
0
 public function __construct(AbstractServer &$server, $socket, $timeout)
 {
     parent::__construct();
     $this->_uid = null;
     $this->_timeout = $timeout;
     $this->_last_time = time();
     socket_getpeername($socket, $this->_address, $this->_port);
     socket_set_nonblock($socket);
     $this->_socket =& $socket;
     $this->_server =& $server;
 }
示例#3
0
 public function __construct(IDataSourceDriver &$driver)
 {
     parent::__construct();
     $this->_driver =& $driver;
 }
示例#4
0
 public function __construct(IClient &$client)
 {
     parent::__construct();
     $this->_clientControl =& $client;
     $client->addEventListener($this);
 }