PHPDaemon\Servers\WebSocket\Connection::getFrameType PHP Method

getFrameType() public method

Get real frame type identificator
public getFrameType ( $type ) : integer
$type
return integer
    public function getFrameType($type)
    {
        if (is_int($type)) {
            return $type;
        }
        if ($type === null) {
            $type = 'STRING';
        }
        $frametype = @constant(get_class($this) . '::' . $type);
        if ($frametype === null) {
            Daemon::log(__METHOD__ . ' : Undefined frametype "' . $type . '"');
        }
        return $frametype;
    }