namespace BestHTTP { /// /// Possible states of a Http Connection. /// The ideal lifecycle of a connection that has KeepAlive is the following: Initial => [Processing => WaitForRecycle => Free] => Closed. /// internal enum HTTPConnectionStates { /// /// This Connection instance is just created. /// Initial, /// /// This Connection is processing a request /// Processing, /// /// The request redirected. /// Redirected, /// /// The connection is upgraded from http. /// Upgraded, /// /// 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. /// WaitForRecycle, /// /// The request result's delivered, it's now up to processing again. /// Free, /// /// A request from outside of the plugin to abort the connection. /// AbortRequested, /// /// The request is not finished in the given time. /// TimedOut, /// /// If it's not a KeepAlive connection, or something happend, then we close this connection and remove from the pool. /// Closed } }