public function on_read_ready($in) { $raw = @fread($in, $this->recv_chunk_size); if (ord($raw) == 10) { // enter key JAXLCli::prompt(false); return; } elseif (trim($raw) == 'quit') { $this->stop(); $this->in = null; if ($this->quit_cb) { call_user_func($this->quit_cb); } return; } if ($this->recv_cb) { call_user_func($this->recv_cb, $raw); } }
protected function enable_debug_shell() { $this->cli = new JAXLCli(array(&$this, 'handle_debug_shell')); JAXLCli::prompt(); }
public function onDebugResponse($raw) { $ret = unserialize($raw); print_r($ret); echo PHP_EOL; JAXLCli::prompt(); }