Re: [Swazoo-devel] Reduce connections + stripping the image
Brought to you by:
jbacanskas,
mivsek
From: Bruce B. <bwb...@gm...> - 2008-06-02 14:01:22
|
2008/6/2 Lautaro Fernández <ev...@gm...>: > I've to say that your example showed me another way [I think] to do what I > want to (the 'Single Threading' way is not what I'm looking for, at least > for now =). > If I modify the message "HTTPServer>>start", I can tell the socket to > listen just a fixed number of connections at time to only accept a fixed > number of users :), which by default says 50. Ah, that's the queue size. In other words, how many HTTP requests can be sat in the queue not being handled yet before the *operating system* starts turning them away. If you do want to have up-to a fixed of requests being handled at the same time, have a look at the current connections (from memory cos I'm just about to walk out the door :-)) instance variable. This contains all the active connections (i.e. the Smalltalk processes handling requests) so you may be able to tweak the code based on the size of this connection ... and this would give you good control over the maximum number of requests being actively handled at one time. All the best, Bruce -- Make the most of your skills - with OpenSkills http://www.openskills.org/ |