commsfwsupport/commselements/serverden/src/sd_workersession.cpp
branchRCL_3
changeset 84 486e9e9c45a7
parent 76 576874e13a2c
equal deleted inserted replaced
76:576874e13a2c 84:486e9e9c45a7
   692 	}
   692 	}
   693 
   693 
   694 EXPORT_C void CWorkerSubSession::ConstructL()
   694 EXPORT_C void CWorkerSubSession::ConstructL()
   695 	{
   695 	{
   696 	iSessionProxy = Player().CurrentSessionProxyL();
   696 	iSessionProxy = Player().CurrentSessionProxyL();
   697 	// Try reserving enough space in the transport sender queue so that we don't overflow the queue
       
   698 	// when sending messages in bulk, which can happen in cases like closing the session without 
       
   699 	// closing individual sub-sessions. Protyping reveals that with a high number of number of 
       
   700 	// sub-sessions, a transport queue length twice the number of active sub-session is a safe bet
       
   701 	CCommsTransport* transport = iPlayer->WorkerThread().Transport();
       
   702 	TInt numSubsession = iSession->SubSessions().ActiveCount() + 1;
       
   703 	const TInt numUndeliveredMessae = numSubsession * 2;
       
   704 	transport->PreallocateQueueSpaceL(numUndeliveredMessae);
       
   705 	}
   697 	}
   706 
   698 
   707 EXPORT_C CWorkerSubSession::~CWorkerSubSession()
   699 EXPORT_C CWorkerSubSession::~CWorkerSubSession()
   708 	{
   700 	{
   709 	// Session may be disappeared by now, so DO NOT USE IT
   701 	// Session may be disappeared by now, so DO NOT USE IT