public HttpRequest(string httpLine, HttpHeaders headers, IAsyncReadable body) { HttpLine = httpLine; HttpLineParts = HttpLine.Split(" ", 3); Headers = headers; Body = body; }
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; } }
public LimitIAsyncReadable(IAsyncReadable parent, long limit) { this.Parent = parent; this.Limit = limit; }