[Twisted-Python] typed mktap usage.Options parameters

just jotting down this note so it gets saved someplace: There are some very common types of parameters mktap uses -- remote host or IP, port number, local interface to bind to, password. We should have some sort of typed optParameters for this, so that any tap constructor that takes a port can just say "wordsPort isa port" and get back a number instead of having to int() the string and/or look it up in /etc/services, etc. Another idea being that password-type options should be prompted for rather than specified on the command line, as command line parameters are all too visible in the system process table on many systems.

On 06 Sep 2002 21:27:32 -0700, Kevin Turner <acapnotic@twistedmatrix.com> wrote:
My thought on this is that Reactor and Application should both have "listenString" and "connectString" methods which take a host/port/transport in some sort of string syntax which we can specify on command lines. So you could say... connectString("tcp:8080:localhost") or listenString("ssl:8080"). I haven't fully thought it out and I didn't want to try to rush it in before 1.0 and then change it around lots later, but I think this approach in general is a necessary one (otherwise we'll end up implementing this mktap functionality you describe everywhere that you want to open a socket). -- | <`'> | Glyph Lefkowitz: Traveling Sorcerer | | < _/ > | Lead Developer, the Twisted project | | < ___/ > | http://www.twistedmatrix.com |

Glyph Lefkowitz wrote:
So you could say... connectString("tcp:8080:localhost") or listenString("ssl:8080").
Plan 9 does exactly that: http://plan9.bell-labs.com/magic/man2html/2/dial In the above example I'd change it to: connectString("protocol:host:port") Although each protocol should interpret what comes after the first : separator. Obviously this should be generalised so that the 'LHS' is handed the 'RHS' to process. * [LR]HS - Left/Right Hand Side

On 06 Sep 2002 21:27:32 -0700, Kevin Turner <acapnotic@twistedmatrix.com> wrote:
My thought on this is that Reactor and Application should both have "listenString" and "connectString" methods which take a host/port/transport in some sort of string syntax which we can specify on command lines. So you could say... connectString("tcp:8080:localhost") or listenString("ssl:8080"). I haven't fully thought it out and I didn't want to try to rush it in before 1.0 and then change it around lots later, but I think this approach in general is a necessary one (otherwise we'll end up implementing this mktap functionality you describe everywhere that you want to open a socket). -- | <`'> | Glyph Lefkowitz: Traveling Sorcerer | | < _/ > | Lead Developer, the Twisted project | | < ___/ > | http://www.twistedmatrix.com |

Glyph Lefkowitz wrote:
So you could say... connectString("tcp:8080:localhost") or listenString("ssl:8080").
Plan 9 does exactly that: http://plan9.bell-labs.com/magic/man2html/2/dial In the above example I'd change it to: connectString("protocol:host:port") Although each protocol should interpret what comes after the first : separator. Obviously this should be generalised so that the 'LHS' is handed the 'RHS' to process. * [LR]HS - Left/Right Hand Side
participants (4)
-
Boyd Roberts
-
Glyph Lefkowitz
-
Kevin Turner
-
Steve Waterbury