VW5i SocketAccessor listenFor: maximum (socket wait queue size) 
Author Message
 VW5i SocketAccessor listenFor: maximum (socket wait queue size)

Hi Smalltalkers.

I came across this in the documentation for SocketAccessor in VW5i...

This is from the documentation protocol #howToImplementAServer...
"First, you inform the OS to construct a connection
 queue of some maximum length (5 is the longest queue most implementations
will allow)."

Is this true in the Linux environment (TCP  connection)?  What are the
consequences of setting this to, say, 100.

Thanks, Tim.



Wed, 18 Jun 1902 08:00:00 GMT  
 VW5i SocketAccessor listenFor: maximum (socket wait queue size)
You can set it to whatever you like.  The OS will typically only do what it
can support.  If the backlog is greater than the constant SOMAXCONN linux will
silently implement SOMAXCONN on you.  According to the documentation this is
128 for Linux's > 2.0.

--
For Open Source Middleware Visit http://home.netcom.com/~tgagne



Wed, 18 Jun 1902 08:00:00 GMT  
 VW5i SocketAccessor listenFor: maximum (socket wait queue size)

Quote:

> I came across this in the documentation for SocketAccessor in VW5i...

> This is from the documentation protocol #howToImplementAServer...
> "First, you inform the OS to construct a connection
>  queue of some maximum length (5 is the longest queue most implementations
> will allow)."

This length specifies how many connection attempts (that have not yet
been #accept-ed by Smalltalk) the OS will queue.

Quote:
> Is this true in the Linux environment (TCP  connection)?  

Yes but not the same as other OSes, for info see the man page for
listen(2).

Quote:
> What are the consequences of setting this to, say, 100.

Holding more clients in a waiting mode rather than getting 'connection
refused' on an overloaded server.

Generally you need it on servers where many connection attempts (like
http) are made and the server cannot allways keep up with accepting new
connections but does guarantee it will service them after a moderate
delay.

It might be of use if you are writing a single-process server where only
one connection can be handled (#accept) at a time.

It could be of use in situations where bursts of connection attempts to
the same port are generated for some reason.

HTH,

Reinout



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. SocketAccessor waiting in an endless semaphore

2. Howto wait for multiple queues (Queue.py)?

3. Maximum size of unnamed pipe size in ruby

4. problem with the maximum window size

5. Maximum record size limitation?

6. HELP: what is the maximum size of a Pixmap

7. JPEG / RB picture maximum size?

8. MEMO text field - Maximum Size

9. Maximum array size in S87

10. Maximum .dbf size...

11. What is maximum db size for Clarion files

12. what is the maximum size of an array?

 

 
Powered by phpBB® Forum Software