Classification: C++ Category: Client-Server
Created: 05/27/2008 Modified: 05/29/2008
Number: FAQ-1636
Platform: Not Applicable

Question:

When I send data from my client to my server synchronously the data is received properly, but after modification to asyncrhonous sending the recieved data is garbage. What might be causing this?

Answer:

A possible cause of this problem would using a TBuf on the stack in the client side. This is acceptable in synchronous calls because the client-side buffer is still in scope when the message is received by the server, but it will fail for asynchronous calls if the buffer goes out of scope. The solution is to use a member variable that is guaranteed to remain in scope - for example, making the buffer a class member variable.

Legal Disclaimer | Privacy Policy | Sitemap | Media center | Contact us | © 2008 Symbian Ltd