JAXLSocketClient::send PHP Method

send() public method

public send ( string $data )
$data string
    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;
    }

Usage Example

Beispiel #1
0
 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();
     }
 }
All Usage Examples Of JAXLSocketClient::send