×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    31

    Client server data transfer.

    Hi,

    I have a client and a server running on different processes. I send a size(TInt) from client side as " args.Set(0, size) " and server side i tried to recover the size using " TInt bufSize = (aMessage.Int0()) " . This method should work fine but its not working in this situation i.e if size = 4 from client side I am not getting 4 at server side I am getting a very large value. I tried ReadL() but its the same result every time.

    Any idea how to go about it?
    Regards,
    Pritam.

  2. #2
    Regular Contributor
    Join Date
    Jun 2007
    Location
    Bangalore
    Posts
    208

    Re: Client server data transfer.

    Quote Originally Posted by PritamS60 View Post
    Hi,

    I have a client and a server running on different processes. I send a size(TInt) from client side as " args.Set(0, size) " and server side i tried to recover the size using " TInt bufSize = (aMessage.Int0()) " . This method should work fine but its not working in this situation i.e if size = 4 from client side I am not getting 4 at server side I am getting a very large value. I tried ReadL() but its the same result every time.

    Any idea how to go about it?
    send using reference.

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    31

    Re: Client server data transfer.

    Quote Originally Posted by mdzahidul_haque View Post
    send using reference.
    Reference of T-objects are not required in TIpcArgs. Can you elaborate your suggestion on how to do it?
    Regards,
    Pritam.

  4. #4
    Regular Contributor
    Join Date
    Jun 2007
    Location
    Bangalore
    Posts
    208

    Re: Client server data transfer.

    well are are correct it should work, and infact it is working also, if you debug the code you will find that the value i.e 4 will come but from the next line it will show the large value,I think this is only happening. Actually, this large value is the garbage valve due to pass by value, may be.

    So, once again debug the code and chk the value exactly at the line
    TInt bufSize = aMessage.Int0();

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    31

    Re: Client server data transfer.

    Quote Originally Posted by mdzahidul_haque View Post
    well are are correct it should work, and infact it is working also, if you debug the code you will find that the value i.e 4 will come but from the next line it will show the large value,I think this is only happening. Actually, this large value is the garbage valve due to pass by value, may be.

    So, once again debug the code and chk the value exactly at the line
    TInt bufSize = aMessage.Int0();
    Yes I ahve check it many times , I even trien Read() as I said earlier. But its a huge number!!!!!!
    Regards,
    Pritam.

  6. #6
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Client server data transfer.

    You should probably post the code, my guess is you are using a TInt and not a TInt32 which seems to have issues with the way c++ handles overloading of types.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  7. #7
    Registered User
    Join Date
    Apr 2009
    Posts
    31

    Smile Re: Client server data transfer.

    Thanks Paul.... I got my integer value at server side. It must be some over loading issue.
    Regards,
    Pritam.

Similar Threads

  1. Animation Example 注释
    By hanwen813 in forum Symbian
    Replies: 1
    Last Post: 2010-08-07, 04:32
  2. SOCKET PROGRAMMING: Client can not connect to server...
    By simbiyan in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2007-04-22, 20:00
  3. Client Server (Async) exchange HBufC data type
    By Zaibach in forum Symbian C++
    Replies: 2
    Last Post: 2006-11-10, 11:39
  4. how to use udp, for sending data server to client
    By acayir in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-08-02, 19:18
  5. Exchanging data between client and server
    By rihoe in forum Symbian C++
    Replies: 1
    Last Post: 2005-01-31, 08:25

Posting Permissions

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