You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
8 months ago
|
namespace BestHTTP.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
|
||
|
}
|
||
|
}
|