Could some help me, please!
Does socket accept more than 1024 character at once?
In .MMP
#if defined(WINS)
LIBRARY prnesock.lib
#else
LIBRARY esock.lib
#endi
void CGSHTTPClient::SendL(TInetAddr &aIpAddress, const TDesC8* aDesc)
{
// Lets use 8 bit buffer for request
iData2 = new(ELeave) TBuf8<16384>;
*iData2 = *aDesc;
iSocket.Connect( aIpAddress, iStatus );
SetActive();
}
void CGSHTTPClient:oSendL()
{
//iSocket.Write(*iData2, iStatus);
iSocket.Send(*iData2, KSIWriteOnly, iStatus); // this wont send whole buffer if its more than 1024 characters big.
SetActive();
}
After DoSendL() we will go to RunL() and iStatus is 10054 that might tell something for you Pro's. Server will get stuff that we write in socket but not whole buffer if its more than 1024 characters length. Server will also send return message but socket cant get anything visible.
It works almost fine in cell phone because Client can have servers response message, but somehow server cant get whole packet that Client sent.
I have pasted more code over here:
http://discussion.forum.nokia.com/fo...ad.php?t=77622
-Arachidyl

oSendL()
So if anyone is wondering if you can send more than 1024 characters in socket answer is yes you can. Socket will automatically split those in 1024 packages or at least i think so. Well servers never got more than 1024 characters at once. Packates arrived in 1024 characters packets and you just need to read many times from socket, just like we do in Symbian side.


