I did something like this on a recent project. The Palm isn't multitasking
(at least, not at the application level), you're right, and this makes this
kind of multithreaded behavior a bit of a chore to implement.
The fact that you have several local databases open shouldn't be a problem.
The difficult part is accepting user input (handling user events) while
doing stuff locally.
Our application had to wait for user idle time and periodically query a
network server over TCP/IP. We passed EvtGetEvent() a fairly short timeout
and used nilEvents to track user idle time. Depending on how responsive
your system has to be, this might work. You could use all user idle time
(via timeouts and nilEvents) to read and write from open sockets.
The downside is that it's very hard to make this reasonably fast without
slowing down the responsiveness of your application to user events. It's
also a fairly big project and is extremely hard to debug. You're basically
writing your own multitasking.
For what it's worth ...
Regards,
Ben Flaumenhaft
>Hi all,
>I want to open a network connection to feed data back to a central server
>and continue allowing the user enter data to a separate database from the
>one my feed is reading from. I'm aware the Palm isn't strictly multi-tasking
>but can this be done?
>Thanks,
>Loughlin.