Exemple #1
0
 internal void Recycle(HTTPConnectionRecycledDelegate onConnectionRecycled)
 {
     OnConnectionRecycled = onConnectionRecycled;
     if (!(State > HTTPConnectionStates.Initial && State < HTTPConnectionStates.WaitForProtocolShutdown) || State == HTTPConnectionStates.Redirected)
     {
         RecycleNow();
     }
 }
 protected void RecycleNow()
 {
     if (State == HTTPConnectionStates.TimedOut || State == HTTPConnectionStates.Closed)
     {
         LastProcessTime = DateTime.MinValue;
     }
     State          = HTTPConnectionStates.Free;
     CurrentRequest = null;
     if (OnConnectionRecycled != null)
     {
         OnConnectionRecycled(this);
         OnConnectionRecycled = null;
     }
 }
Exemple #3
0
        protected void RecycleNow()
        {
            if (State == HTTPConnectionStates.TimedOut ||
                State == HTTPConnectionStates.Closed)
                LastProcessTime = DateTime.MinValue;

            State = HTTPConnectionStates.Free;
            CurrentRequest = null;

            if (OnConnectionRecycled != null)
            {
                OnConnectionRecycled(this);
                OnConnectionRecycled = null;
            }
        }
Exemple #4
0
 internal void Recycle(HTTPConnectionRecycledDelegate onConnectionRecycled)
 {
     OnConnectionRecycled = onConnectionRecycled;
     if (!(State > HTTPConnectionStates.Initial && State < HTTPConnectionStates.WaitForProtocolShutdown) || State == HTTPConnectionStates.Redirected)
         RecycleNow();
 }