public function push($cb)
{
parent::push(CallbackWrapper::wrap($cb));
}
/** * Sends a frame. * @param string $data Frame's data. * @param integer $type Frame's type. See the constants. * @param callback $cb Optional. Callback called when the frame is received by client. * @callback $cb ( ) * @return boolean Success. */ public function sendFrame($data, $type = 0x0, $cb = null) { if ($this->finished) { return false; } $this->framesBuffer[] = $data; if ($cb !== null) { $this->onWrite->push($cb); } $this->flush(); return true; }