AbstractReflectSession ::
~AbstractReflectSession() 
{
   TCHECKPOINT;
   SetInputPolicy(AbstractSessionIOPolicyRef());   // make sure the input policy knows we're going away
   SetOutputPolicy(AbstractSessionIOPolicyRef());  // make sure the output policy knows we're going away
}
Esempio n. 2
0
void
WUploadThread::SetRate(int rate, ThreadWorkerSessionRef & ref)
{
	fTXRate = rate;
	if (rate != 0)
		ref()->SetOutputPolicy(AbstractSessionIOPolicyRef(new RateLimitSessionIOPolicy(rate)));
	else
		ref()->SetOutputPolicy(AbstractSessionIOPolicyRef(NULL));
}
Esempio n. 3
0
void
WUploadThread::SetRate(int rate)
{
	fTXRate = rate;
	if (!fTunneled)
	{
		if (rate != 0)
			qmtt->SetNewOutputPolicy(AbstractSessionIOPolicyRef(new RateLimitSessionIOPolicy(rate)));
		else
			qmtt->SetNewOutputPolicy(AbstractSessionIOPolicyRef(NULL));
	}
}