public function send($data) { $this->obuffer .= $data; // add watch for write events if ($this->writing) { return; } JAXLLoop::watch($this->fd, array('write' => array(&$this, 'on_write_ready'))); $this->writing = true; }
public function test_jaxl_socket_client() { $sock = new JAXLSocketClient(); $sock->connect('tcp://127.0.0.1:5222'); $sock->send("<stream:stream>"); while ($sock->fd) { $sock->recv(); } }