Benjamin Bloomfield wrote:
I'm wondering how to avoid getting this error
(netErrTooManyTCPConnections) when doing a SocketConnect.
It seems like I must not be closing connections properly, because
every time I make a connection, I immediately transfer data, receive
data, and close the connection. However, doing this many times in a
row leads to the netErrTooManyTCPConnections upon calling
SocketConnect. The only way to make a SocketConnect after that is to
wait several minutes (5 or so seems to work), or to reset the device.
Welcome to Hell... when you try to close a connection, the system
doesn't immediately close the socket. Instead, the socket stays
'lingering' for a while. This behavior can be disabled, search for
'linger' in the list archives. You should also find something about a
bug in Palm OS 5.0+. The bytes used to set the linger status were
inverted. Seems that this bug was already fixed in newer Palm OS
versions, but I never got any official answer for this.
Good luck,
Luciano
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/