On Sun, 13 Jan 2002, Gary Gorsline wrote:

> The way a socket reacts depends on the blocking mode of the socket. 
> Blocking will wait, where as Non-Blocking will only immediately return. 
> You need to pick one of these modes that suites your application best
> and then design your system accordingly.  I usually use Non-Blocking, so
> that my app can do other things while "waiting".  At least give the user
> a Cancel Button. 

I know the difference between blocking and non-blocking sockets, as I've
been doing TCP/IP programming for at least 5 years.  What I don't see is
any relevance to my problem (trying to listen on a socket and getting
"connection refused" when trying to connect to it from another machine). 
That is, unless you know for sure that setting my listening socket to non-
blocking will make it work properly on a Palm OS device.  It's not needed
on any other TCP/IP stack out there, and POSE proves this (works fine on
that). 

The last thing I did, trying to work this thing out, was to follow a tip I
found somewhere about having a timeout for the NetLibSelect call.  Before,
I was polling with that and had a timeout of 0 for the actual select call. 
Now, I have NetLibSelect at the core of my event loop when the network
library is loaded, checking the sysFileDescStdIn descriptor as well to see
if there's any events that need processing.  Doing that probably saves the
battery a bit, but still doesn't solve the listening socket problem.

-----------------------------------------------------------------------
Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/
Software Developer  //  Gamer  //   Webmaster  //  System Administrator
Have you had yours today?  Humor Break - http://www.arthurian.nu/hb/


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

Reply via email to