Angus Leeming <[EMAIL PROTECTED]> writes:
| Lars Gullik Bj�nnes wrote:
>
>> At least I find it a bit nicer. Comments/Objections?
>
| You go on to use 'MAX_CLIENTS' below, so don't cull it here:
>
| 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).
>
| In English it's "caught":
| + // The program will also receive a SIGPIPE
| + // that must be catched
Not my doing, but I'll fix it.
>> I have not fixed up qt and gtk to use the same scheme yet.
>
| Well, I see you got round to it in the next mail.
right, Perhaps xforms should use a similar wrapper to socket_callback,
to encapsulate the fl_add/remove_io_callback stuff.
(Hmm I see a possible opportunity to simplify the qt code a bit more.)
>
| Incidentally, will this abstraction work on Windows machines which don't
| use file descriptors?
I have no idea, I have never seen such a box.
>
| Index: frontends/lyx_gui.h
| +void register_socket_callback(int fd, boost::function<void()> func);
| +void unregister_socket_callback(int fd);
>
| Ie, does Qt provide an 'fd' identifier in its generic interface or is Joao
| using some X11-specific Qt wrapper?
It is certainly possible to hide the 'fd' further, but I won't look at
that until I am shown a case where we need it.
(we can f.ex. hide the needed handle inside a boost::any and pass
that.)
>> (And I you wonder what I am doing: I am combing my way through the
>> code and looking close at stuff that went in when I was not paying
>> close attention. And trying to understand all the cryptic stuff that
>> Andre added of course.)
>
| Of course. It's good to see.
So no substantial objections to this patch then?
--
Lgb