How do i limit the number of socket connections...
Stoic Eustov
Greenhorn
Joined: Feb 13, 2002
Posts: 8
posted
0
I have a file server that accepts connections, i would like to limit the number of connections to 45 users... The �ServerSocket (int port, int backlog)�, does not work due to OS buffers... Anybody know how to limit the number of connections, then free the connection upon user disconnect. Thx
Lewin Chan
Ranch Hand
Joined: Oct 10, 2001
Posts: 214
posted
0
Why don't you make a threadpool of 45 request handlers, and just notify them when there is a new request. I think the o'reilly book Java Network Programming has a pretty good example of doing this.
I have no java certifications. <br />This makes me a bad programmer.<br />Ignore my post.
subject: How do i limit the number of socket connections...