What is the timeout on your socket connection (check both ends)? Could that
be the issue? Also make sure you're not closing the netlib. I'm doing
something similar and I just make a connection every time I want to poll.

On 2/12/07, Evan <[EMAIL PROTECTED]> wrote:
>
> I'm working on an IM client, and now it could work well in normal launch.
> But I need it to work under background
> I've done test like this: open a socket and connect to the IM server, and
> they could send/recv well. When appStop, I don't close the socket, but save
> the NetSocketRef to my database. The second time I launch the app, the app
> will read the NetSocketRef from the database and continue to send/recv from
> this socket.
> But, the problem is, when the second time launch the app, it could recieve
> a tcp package from the server, then the socket will be closed automaticlly.
> I don't know why the socket was closed.
> I have tested many times and to many different server, they are all the
> same. Even I quite the application for like 5 minutes, and then re-launch
> it, it could recieve the last message from the socket. Then if I try to
> read/recv any more, there would be an error that the socket is closed.
> Any suggestion? Maybe I could make a shared library, and then create a
> socket from the shared library. Then I guess, the system will not auto close
> the socket.
> --
> For information on using the PalmSource Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to