On Sat, 26 Jan 2002, Steve Mann wrote:

> The new O'Reilly book Palm OS Network Programming has examples of
> listening sockets. I haven't tried them, but the descriptions sound
> reasonable. 

That's how I got listening sockets in general working, by using that book
as a guide (the online version of it, at least :-)

What they don't cover, though, is the problem of binding to a specific
port and issues with that.  What they do in the examples is bind to port 0
and let the OS pick a port. 

That's the problem I'm still wrestling with.  I can bind to the port once
after the network connection is made, but have to disconnect and reconnect
it to reset that state before I can do it again.  What I'd do on any other
platform is use the "reuse address" option on the listening socket to
allow the binding to work (doesn't work right in Windows, though, but that
fits right with everything else Microsoft).  This option is documented for
Palm OS and it's in the header files, but it isn't implemented. 

There's been a thing going around about turning off the "linger" option on
a socket to keep it from hanging around and tying up the port or other
resources, but so far I've not had any luck with that either. 

-----------------------------------------------------------------------
Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/
Software Developer  //  Gamer  //   Webmaster  //  System Administrator
"What I like about deadlines is the lovely whooshing sound they make
 as they rush past." --Douglas Adams


-- 
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