Thread View: comp.os.os2.networking
2 messages
2 total messages
Started by Kevin Rosenthall
Wed, 02 Aug 1995 00:00
TCP/IP 2.0 Socket Resources
Author: Kevin Rosenthall
Date: Wed, 02 Aug 1995 00:00
Date: Wed, 02 Aug 1995 00:00
46 lines
2582 bytes
2582 bytes
Hi.
We are developing a server process, that is to be able to accept
multiple concurrent socket connections, and be robust enough to have
these connections break and connect many times for periods of weeks.
In other words, a robust Internet server utility.
Perhaps someone else has observed similar problems:
There is a theoretical maximum of 2048 concurrent sockets using
TCP/IP. I think the effectivel number people have been observing is
more like 200, but that doesn't matter to us (yet).
When you create a socket, the system (or TCP/IP stack) gives you a
socket descriptor number, e.g. 26. Now, if I close socket 26, and
request a new socket, rather than getting 26 again, the system gives
me socket 27. It would appear that the system is not very good at
recycling old sockets.
We have experienced problems when, after running a program for a long
time, the socket number values approach 2048. What we have observed
is that the socket values "roll over" 2048 back to 1. This, in
itself, is not bad, but we have observed frequently that the TCP/IP
process dies (well, just sits/hangs) shortly after rolling over 2048.
Has anyone some comments on this situation? These would be most
appreciated.
Regards,
]{evin
__________________________________________________________________________
Kevin Rosenthall Kevin.Rosenthall@PoBox.Com
15 Dunloe Road
Richmond Hill, Ontario Tel: (905) 883-6581
Canada L4B 2H5 Fax: (905) 886-5749
Re: TCP/IP 2.0 Socket Resources
Author: Keith Bennett
Date: Wed, 06 Sep 1995 00:00
Date: Wed, 06 Sep 1995 00:00
27 lines
2225 bytes
2225 bytes
In article <3vo653$ahi@inforamp.net>, Kevin Rosenthall <Kevin.Rosenthall@PoBox.Com> wrote: >When you create a socket, the system (or TCP/IP stack) gives you a >socket descriptor number, e.g. 26. Now, if I close socket 26, and >request a new socket, rather than getting 26 again, the system gives >me socket 27. It would appear that the system is not very good at >recycling old sockets. Kevin - I don't think that this behavior demonstrates any lack of efficiency. I'm pretty sure that when a socket is closed, its resources (memory) are freed, even though the number isn't immediately reused. Incrementing the number has an advantage over immediately reusing it: If you've passed the socket handle to another thread, etc., and the socket has been closed, then a call with that socket handle will fail. This is as it should be. Otherwise, the call would succeed even though it referred to a socket different from the intended one. - Keith -- -------------------------------------------------------------------------- Keith Bennett Bennett Business Solutions, Inc. Silver Spring, MD USA OS/2 & DOS Software Development kbennett@cpcug.org (301) 871-7696
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads