If it is indeed possible to have a background thread listening to
the socket, and that thread can create and driect events to the foreground
application, then this does make perfect sense. I'll be looking into it.
Thanks for the brainwave ;-)
Pete
> -----Original Message-----
> From: Biales, Brian [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 10, 2000 8:32 AM
> To: 'Palm Developer Forum'
> Cc: 'Ford, Peter'
> Subject: RE: Sockets and Events
>
> Peter,
> I've not started coding yet, but I had the same question. The only way I
> could see to do this is the following, and I'll be honest, I don't know
> the
> OS well enough yet to know if even this would work...
>
> Since the Socket calls are blocking, I was thinking of having a daemon
> "application" running in the background. I know apps are single threaded,
> but I thought I read somewhere that a background program could run. This
> application would call the blocking recv(). When data arrived, it would
> post an event to the main application. Sends could be handled the same
> way,
> potentially, with a queue of messages and a post to the send thread, the
> send thread would then keep calling send() until the whole message got
> out.
>
> Does this make any sense?
>
> -Brian
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html