The good news is: this is possible.
The bad news is: it's a big pain. I had to do a similar thing under a
Symbol SPT 1740 (Palm with wireless TCP/IP).
The Palm doesn't have any kind of multithreading (obviously), so this means
you have to do the non-blocking TCP code yourself, by hand. You have to
send lots of timeouts to your socket code, lots of timeouts to your events,
and handle both repeatedly, making sure that no single thing you do takes
long enough to slow the other down.
For example, handling a pen tap can't take so long that you lose your
network connection; similarly, you can't take so long reading and parsing
communications that your users get frustrated when the Palm doesn't respond
to pen taps.
Hope that helps ...
Regards,
Ben Flaumenhaft.
>I've had some experience writing normal tcp client/server under unix but am
>just starting out writing networking code on the palm. I am confused as to
>where I can put my code in the event loops so as to still provide GUI
>interactivity to the user. For instance, in the single threaded,
>event-driven Palm environment, how can I set it to poll/select a socket
>every X milliseconds, then display any data which arrives, while still
>allowing the user to enter and send their own data? Currently my Palm client
>connects to a simple server and can send data to it whenever the user types
>text and clicks a "send" button, however I am confused as to how to
>structure the code to allow a two-way communication (e.g. for a chat kind of
>program). Any help greatly appreciated!
>
>Rhys.
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/