On Mon, Sep 28, 2009 at 8:10 PM, Benjamin Rutt <rut...@osu.edu> wrote:
> But, it seems the recvline.HistoricRecvLine class wants me to use > self.terminal rather than self.transport to talk to the client. That's > fine, but it seems that self.terminal lacks a getPeer() method. How do I > find out the IP address of the client inside a conch ssh server? (For > starters, I wish to log all successful client connections so I know who's > connecting). > So, after reading through the code a bit, self.terminal should be an ITerminalTransport. There are only a few ITerminalTransport implementations, several of which are also Protocol subclasses and therefore have a 'transport' attribute. I'm not 100% sure what the eventual composiiton of your application will be, but you could try self.terminal.transport.getPeer(); it might work. Technically speaking, ITerminalTransport is a subclass of ITransport, which has a getPeer method. Therefore any classes which implement ITerminalTransport without providing getPeer are buggy. It would be really helpful if you could provide a patch that addressed the issue you mention :).
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python