×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    RSocket SendTo throws KErrTooBig only when sending to mobile network

    Hi,

    in my Applikation i'm sending udp packet data through a RSocket.

    iSocket.SendTo(_L8("this is a test"), anAddr, 0, iStatus);

    works fine, when i'm sending data over wifi to socket.

    Only when i'm trying to send over the mobile (hsdpa) network, the result in iStatus is -40 (KErrTooBig).

    Anybody an idea, what is happening here?

    Best Regards,
    Andi

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: RSocket SendTo throws KErrTooBig only when sending to mobile network

    Always avoid using local variables with async methods. It will save you some headaches..

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: RSocket SendTo throws KErrTooBig only when sending to mobile network

    An addition: not just anAddr is a local variable (and should be copied to a member variable), but _L8 is a local entity too. However if you replace it with _LIT8, that is a global one.

  4. #4
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    Re: RSocket SendTo throws KErrTooBig only when sending to mobile network

    Hi,
    and thank you both.
    So i think, the Literal ist the problem then. The Address is no lokal variable in my real code i just wrote the example in here, and didn't thought about the variable name.

    As I told, it works on the wifi network. Is this because the network is faster and so the async sending is so fast, that the lokal Litaral is not destroyed until sending is finished?

    Regards,
    Andi

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: RSocket SendTo throws KErrTooBig only when sending to mobile network

    Quote Originally Posted by Lichtens View Post
    As I told, it works on the wifi network. Is this because the network is faster and so the async sending is so fast, that the lokal Litaral is not destroyed until sending is finished?
    It is a matter of luck and what your code does after returning from this method. The literal itself will remain in the memory block assigned to the program stack until it is overwritten. And it entirelly depends on your application.

  6. #6
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    Re: RSocket SendTo throws KErrTooBig only when sending to mobile network

    Ok, changing the literal to a global one, solved the problem!

    Thanks a lot,
    Andi

Similar Threads

  1. Replies: 11
    Last Post: 2007-10-03, 19:46
  2. Sending an SMS from Mobile to Servlet?!!
    By omarZam in forum General Messaging
    Replies: 0
    Last Post: 2006-06-04, 17:06
  3. retrieving network measurement report (NMR) of mobile phone
    By baki_aiub in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-05-26, 19:16
  4. How Mobile equipment interact with new GSM network on the move?
    By parvez_siddiqui in forum Multimodecards
    Replies: 1
    Last Post: 2002-09-27, 09:47
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

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