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(); } }
function test_jaxl_socket_client() { $sock = new JAXLSocketClient("127.0.0.1", 5222); $sock->connect(); $sock->send("<stream:stream>"); while ($sock->fd) { $sock->recv(); } }
public function negotiate() { $pkt = pack("C3", 0x5, 0x1, 0x0); $this->client->send($pkt); // enter sub-negotiation state }