Joao Luis Meloni Assirati <[EMAIL PROTECTED]> writes:

| Lars wrote:
>
>> | Index: lyxsocket.C
>> | -          fd_(lyx::support::socktools::listen(addr, MAX_CLIENTS)),
>> | +          fd_(lyx::support::socktools::listen(addr, 3)),
>
>> The use of MAX_CLIENTS here is not doing what the original author
                          ^^^^

>> thinks it does. The backlog parameter is just how many _outstanding_
>> non-accepted clients that are allowed to wait at the same time, not
>> the number of clients allowed to access the socket server, so it is
>> better to keep this number low. It could possible be lowered down to 1
>> even, man listen(2).
>
| Oh... I assure you that MAX_CLIENTS doing what I wanted it to do. Maybe you 
| wanted to say that I don't know what the second argument of listen() does, 
| but it amounts to the same :).

MAX_CLIENTS as used in the call to listen did not do what you thought
it did.

| To me, it seemed that the maximum number of connections should be also a good| guess 
to the backlog, that is, the number of pending connections that the 
| operating system permits to the socket.

Note that several BSDs has a max of 5 for the backlog.

| Certainly 1 is not a good choice, as 
| if lyx is busy it will not accept() two successive connections.
>
| The patch seems fine to me.

except the qt connection stuff that will most likely not work.

-- 
        Lgb

Reply via email to