public function isMasked()
    {
        if (!isset($this->masked)) {
            if (!isset($this->buffer[1])) {
                throw new FrameException('Cannot tell if frame is masked: not enough frame data received');
            }
            $this->masked = (boolean)(ord($this->buffer[1]) & self::BITFIELD_MASKED);
        }
        return $this->masked;
    }