PHPDaemon\SockJS\Session::onFrame PHP Method

onFrame() public method

onFrame
public onFrame ( string $msg, integer $type ) : void
$msg string [@todo description]
$type integer [@todo description]
return void
    public function onFrame($msg, $type)
    {
        $frames = json_decode($msg, true);
        if (!is_array($frames)) {
            return;
        }
        $this->route->onWakeup();
        foreach ($frames as $frame) {
            try {
                $this->route->onFrame($frame, \PHPDaemon\Servers\WebSocket\Pool::STRING);
            } catch (\Exception $e) {
                Daemon::uncaughtExceptionHandler($e);
            }
        }
        $this->route->onSleep();
    }