Exemple #1
0
 public HttpRequest(string httpLine, HttpHeaders headers, IAsyncReadable body)
 {
     HttpLine      = httpLine;
     HttpLineParts = HttpLine.Split(" ", 3);
     Headers       = headers;
     Body          = body;
 }
Exemple #2
0
        public static async Task Skip(this IAsyncReadable reader, long count)
        {
            var remaining = count;

            while (remaining > 0)
            {
                var chunk = (int)Math.Min(1024, remaining);
                var data  = await reader.ReadBytes(chunk);

                remaining -= data.Length;
            }
        }
Exemple #3
0
 public LimitIAsyncReadable(IAsyncReadable parent, long limit)
 {
     this.Parent = parent;
     this.Limit  = limit;
 }