Cannot to receive data from server
Hi members,
I am using RSocket. And cannot to receive data from server over GPRS.
My mobile operator using a proxy (IP: 194.176.32.151 PORT: 8080), in this case I must connect to mobile operator IP. Function Connect(TInetAddr& aInetAddr).
Code:
void CAOExampleEngine::Connect(TInetAddr& aInetAddr){
iState = EConnecting;
iObserver->ToState( EConnecting );
TInt err = iSocket.Open( iSocketServ, KAfInet, KSockStream, KProtocolInetTcp );
if( err != KErrNone ){
_LIT( KMsg, "Failed to open socket: %d." );
iMsgBuf.Format( KMsg, err );
iObserver->Cancelled( iMsgBuf );
Reset();
}
aInetAddr.Input(_L("194.176.32.151"));
aInetAddr.SetPort(8080);
iSocket.Connect(aInetAddr, iStatus);
SetActive();
}
The next, I want to make HTTP request to my server (IP: 195.14.172.97 PORT: 80). In this case I construct HTTP request and send it to server. Function MakeHTTPRequest(). When execute this function I see that server execute this HTTP request. But problem is that I cannot to receive a data from a server. That get data from server I am use ReadHTTPResponse(TBool aContinue) function.
Code:
 void CAOExampleEngine::MakeHTTPRequest(){
iState = EWriting;
iObserver->ToState( EWriting );
_LIT8(KWrite,"GET http://195.14.172.97:80//s/m.php HTTP/1.0 \r\n\r\n");
iSocketBuf.Append(KWrite);
	iSocket.Send(iSocketBuf,0,iStatus);
SetActive();
}
void CAOExampleEngine::ReadHTTPResponse(TBool aContinue){
iState = EReading;
iObserver->ToState( EReading );

// append data read from the socket to the end of the output buffer
// todo: L-method called from non-L method
iOutputBuffer->InsertL( iOutputBuffer->Size(), iSocketBuf );
iSocketBuf.Zero();

if( aContinue ){
iSocket.RecvOneOrMore( iSocketBuf, 0, iStatus, iStupid );
SetActive();
}
}
Maybe who anyone known why I cannot to re data from server?

PLEASE help me!!!