示例#1
0
        Utf8Span ReadHttpVersionAsUtf8Span()
        {
            Utf8Span httpVersion;
            int      parsedBytes = HttpRequestParser.TryParseHttpVersion(Buffer, out httpVersion);

            if (parsedBytes == 0)
            {
                return(Utf8Span.Empty);
            }
            Buffer = Buffer.Slice(parsedBytes + Eol.Length);
            return(httpVersion);
        }
示例#2
0
        Utf8String ReadHttpVersionAsUtf8String()
        {
            Utf8String httpVersion;
            int        parsedBytes;

            if (!HttpRequestParser.TryParseHttpVersion(Buffer, out httpVersion, out parsedBytes))
            {
                return(Utf8String.Empty);
            }
            Buffer = Buffer.Slice(parsedBytes + Eol.Length);
            return(httpVersion);
        }