On 10-Jul-2000 DCU wrote:
> I am developing Socket applications for the palmos. I am currently having
> problems with closing a socket, as they do not seem to close with the
> NetLibCloseSocket command and this eventually creates a problem after 16
> data transmissions occur. The problem/error they I have is Too Many TCP
> connections. I am not sure why I get this error since I close the
> connection after every transmission. There should only be one connection
> open at any given time.
It is a PalmOS bug. The work-around is to turn off lingering.. actually the
bug is that turning off lingering requires you to turn it on with a time of 0
:)
NetSocketLingerType linger;
linger.onOff = true;
linger.time = 0;
if (NetLibSocketOptionSet(AppNetRefnum, sock, netSocketOptLevelSocket,
netSocketOptSockLinger, &linger, sizeof(linger), AppNetTimeout,
&errno) != 0) {
/* error */
}
/* Chris Faherty <[EMAIL PROTECTED]> */
/* Your Stock has crashed - you must now restart your system */
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/