Recieve File Problem

Login to reply to this topic.
Sun, 2005-07-31 19:21
Joined: 2004-07-15
Forum posts: 71
hii all

I want to recieve a file from Computer throw GPRS connection using TCP/IP , i 've a very strange problem the code works fine when i put sleep after RecvOneOrMore sure it's very slowwwww , any ideas what could be the problem

here it is my code

Code:
void CSocketReader::IssueReadL()
{

iSocket.RecvOneOrMore( iBuffer ,0, iStatus, iDummyLength);
iSentSize += iDummyLength() ;
sleep(3);
AddData();
SetActive();

}

The AddData() method
Code:
void CSocketReader::AddData()
{

iTotalData->Des().Append(iBuffer);

if(iSentSize == iFileSize) { SaveFile(); iSocketStatus = EDataRecieved;}

}

the RunL

Code:
void CSocketReader::RunL()
{
if(iStatus == KErrNone )
{
switch(iSocketStatus)
{
case EHeadRecieved:
CutHead();
iSocketStatus = ERecieving;
IssueReadL();
break;

case ERecieving :
IssueReadL();
break;
case EDataRecieved:
iWaitDialog->ProcessFinishedL();
iSocket.CancelRecv();
break;
}
}
else
{
iWaitDialog->ProcessFinishedL();
TBuf<10> error;
error.AppendNum( iStatus.Int() );
CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
errorNote->ExecuteLD(error);

}

}



Thanks in advance ....
  • Login to reply to this topic.