public function createFrame($command, array $headers, $body, $legacyMode)
    {
        foreach ($this->resolver as $resolver) {
            if ($frame = $resolver($command, $headers, $body, $legacyMode)) {
                return $frame;
            }
        }
        return $this->defaultFrame($command, $headers, $body, $legacyMode);
    }