more changes on http server low level

This commit is contained in:
UbitUmarov
2020-04-08 14:35:31 +01:00
parent f0f067d05c
commit f976d10de2
6 changed files with 175 additions and 126 deletions

View File

@@ -26,11 +26,13 @@ namespace OSHttpServer
/// </example>
public interface IHttpResponse
{
event EventHandler<BandWitdhEventArgs> BandWitdhEvent;
/// <summary>
/// The body stream is used to cache the body contents
/// before sending everything to the client. It's the simplest
/// way to serve documents.
/// </summary>
///
Stream Body { get; }
byte[] RawBuffer { get; set; }
int RawBufferStart { get; set; }
@@ -142,4 +144,19 @@ namespace OSHttpServer
/// </summary>
KeepAlive
}
public class BandWitdhEventArgs : EventArgs
{
/// <summary>
/// Gets received request.
/// </summary>
public int Result;
public int Request;
public BandWitdhEventArgs(int request)
{
Request = request;
Result = request;
}
}
}