_sock 属性 protected $_sock;
...se file content be turncated $conn = substr($conn, 7); if (($sock = @fopen($conn, 'wb')) === false) { throw new XSException('Failed to open local file for writing: `' . $conn . '\''); } $this->_flag |= self::FILE; $this->_sock = $sock; return; ...
...s.php#L198 (显示) public function close($ioerr = false){ if ($this->_sock && !($this->_flag & self::BROKEN)) { if (!$ioerr && $this->_sendBuffer !== '') { $this->write($this->_sendBuffer); $this->_sendBuffer = ''; } if (!$ioerr && !($this->_flag & sel...
...er respond XSCommand 从服务器读取响应指令 XSServer socket mixed 获取连接资源描述符 XSServer xs XS 服务端关联的 XS 对象 XSServer Protected 属性 隐去继承来的属性 名称类型描述定义于 _conn XSServ...
...SServer.class.php#L350 (显示) public function hasRespond(){ // check socket if ($this->_sock === null || $this->_flag & (self::BROKEN | self::FILE)) { return false; } $wfds = $xfds = array(); $rfds = array($this->_sock); $res = stream_select($rfds, $wfds, $xfds, 0, 0); ...
...heck(); for ($buf = '', $size = $len;;) { $bytes = fread($this->_sock, $len); if ($bytes === false || strlen($bytes) == 0) { break; } $len -= strlen($bytes); $buf .= $bytes; if ($len === 0) { return $buf; } } // error oc...
...d data $this->check(); while (true) { $bytes = fwrite($this->_sock, $buf, $len); if ($bytes === false || $bytes === 0 || $bytes === $len) { break; } $len -= $bytes; $buf = substr($buf, $bytes); } // error occured if ($bytes === false || $b...
getSocket() 方法 public mixed getSocket() {return} mixed 连接标识, 仅用于内部测试等目的 源码: sdk/php/lib/XSServer.class.php#L232 (显示) public function getSocket(){ return $this->_sock;} 获取连接资源描述符
...Server.class.php#L438 (显示) protected function check(){ if ($this->_sock === null) { throw new XSException('No server connection'); } if ($this->_flag & self::BROKEN) { throw new XSException('Broken server connection'); }} 检测服务端的连接情况
...scwsMulti int 获取当前索引库的分词复合等级 XSIndex socket mixed 获取连接资源描述符 XSServer xs XS 服务端关联的 XS 对象 XSServer Protected 属性 隐去继承来的属性 名称类型描述定义于 _conn XSServ...