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