Hi!

I've looked deeper into the lsh code, and I must say, it's very
clever.  Your object system is similar to one I did on a different
project where I tried using C instead of C++.  Your GC mechanism
definitely adds something, though.

I'm not whether those are compliments or not, but they're facts. ;)

Anyway, it's taken me a little while to realize that obtaining the
connection's file descriptor in read_handler is impossible in the
current framework.  That information gets lost sometime after
io_read_write is called, because the io_fd is kept separate from the
abstract_write.

Niels, what is the best way to remedy this problem?  I can see two
basic approaches:

1) Change the flow of control so that a `start SSH version 1' return
   code gets passed all the way up to a routine that knows the file
   descriptor.  This is ugly.

2) Change one of the objects so that it keeps track of the file
   descriptor in a way that can be retrieved from within read_handler.
   This is ugly, too, because everything in ssh_connection is
   transport-independent.

3) Screw the object system, and just stuff the current FD in a global
   variable someplace.  Ugly, too, but a lot less work.

I'll use #3 until you figure out the best way to solve this problem,
at which point I should be able to start cooking up a patch.

Thanks,

-- 
 Gordon Matzigkeit <[EMAIL PROTECTED]> //\ I'm a FIG (http://www.fig.org/)
    Lovers of freedom, unite!     \// I use GNU (http://www.gnu.org/)
[Unfortunately, www.fig.org is broken.  Please stay tuned for details.]

Reply via email to