PHPDaemon\SockJS\Session::sendFrame PHP Method

sendFrame() public method

Sends a frame.
public sendFrame ( string $data, integer $type, callback $cb = null ) : boolean
$data string Frame's data.
$type integer Frame's type. See the constants.
$cb callback Optional. Callback called when the frame is received by client.
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;
    }