public function __construct($recv_cb = null, $quit_cb = null)
{
$this->recv_cb = $recv_cb;
$this->quit_cb = $quit_cb;
// catch read event on stdin
$this->in = fopen('php://stdin', 'r');
stream_set_blocking($this->in, false);
JAXLLoop::watch($this->in, array('read' => array(&$this, 'on_read_ready')));
}