×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    Socket and big packets

    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
    Last edited by arachidyl; 2006-04-04 at 11:00.

  2. #2
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    Re: Socket and big packets

    1348 characters is maximum that we can send from cell phone and 1024 from emulator.

    Still needing your helping hand...

    And btw. im using Nokia 6670 cell phone.
    Last edited by arachidyl; 2006-04-04 at 15:36.

  3. #3
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    Re: Socket and big packets

    It was working all the time. Friend was done some bad coding in server 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.

Similar Threads

  1. Socket read on Nokia 6600 blocks forever
    By delipsingh in forum Mobile Java Networking & Messaging & Security
    Replies: 9
    Last Post: 2010-04-13, 15:00
  2. how to send https request using socket example?
    By jntu_hareesh in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2008-10-07, 14:15
  3. Ignore
    By arachidyl in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-04-04, 10:53
  4. Problem in establishing socket connection
    By elise_ee in forum Mobile Java General
    Replies: 4
    Last Post: 2005-08-30, 13:57
  5. socket sending per packet problem
    By Rx-lee in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-04-13, 13:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×