PHPDaemon\SockJS\Methods\Generic::sendFrame PHP Method

sendFrame() protected method

Send frame
protected sendFrame ( string $frame ) : void
$frame string
return void
    protected function sendFrame($frame)
    {
        if (substr($frame, 0, 1) === 'c') {
            $this->finish();
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Send frame
  * @param  string $frame
  * @return void
  */
 protected function sendFrame($frame)
 {
     $c =& $this->attrs->get['c'];
     if (!is_string($c)) {
         $this->header('400 Bad Request');
         $this->finish();
         return;
     }
     $this->outputFrame($c . '(' . json_encode($frame, JSON_UNESCAPED_SLASHES) . ");\r\n");
     parent::sendFrame($frame);
 }
All Usage Examples Of PHPDaemon\SockJS\Methods\Generic::sendFrame