- Initial commit

This commit is contained in:
Timur Kozanov
2026-07-03 05:02:26 +03:00
commit 374ff1e689
4080 changed files with 388870 additions and 0 deletions

View File

@ -0,0 +1,44 @@
namespace Best.HTTP.Hosts.Connections
{
/// <summary>
/// Possible states of a Http Connection.
/// The ideal lifecycle of a connection that has KeepAlive is the following: Initial => [Processing => WaitForRecycle => Free] => Closed.
/// </summary>
public enum HTTPConnectionStates
{
/// <summary>
/// This Connection instance is just created.
/// </summary>
Initial,
/// <summary>
/// This Connection is processing a request
/// </summary>
Processing,
/// <summary>
/// Wait for the upgraded protocol to shut down.
/// </summary>
WaitForProtocolShutdown,
/// <summary>
/// The Connection is finished processing the request, it's waiting now to deliver it's result.
/// </summary>
Recycle,
/// <summary>
/// The request result's delivered, it's now up to processing again.
/// </summary>
Free,
/// <summary>
/// If it's not a KeepAlive connection, or something happened, then we close this connection and remove from the pool.
/// </summary>
Closed,
/// <summary>
/// Same as the Closed state, but processing this request requires resending the last processed request too.
/// </summary>
ClosedResendRequest
}
}