[Twisted-Python] typed mktap usage.Options parameters

Glyph Lefkowitz glyph at twistedmatrix.com
Sat Sep 7 00:40:51 EDT 2002


On 06 Sep 2002 21:27:32 -0700, Kevin Turner <acapnotic at twistedmatrix.com> wrote:
> 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.

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      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20020906/85d51444/attachment.pgp 


More information about the Twisted-Python mailing list