[Twisted-Python] "Ports" vs. "Listeners"

David C davidc at sat.net
Tue Jul 31 16:34:12 EDT 2001

On Mon, 30 Jul 2001, Glyph Lefkowitz wrote:

> On Mon, 30 Jul 2001, Chris Armstrong wrote:
> > A lot of people get confused by the term "Port". When they think
> > "Port", they don't necessarily think of "something that sits on a
> > port, and listens for incoming connections". That's just how I
> > understand it. Another argument against Port is that it's not only for
> > "waiting for incoming connections" -- clients also allocate ports when
> > they connect to remote hosts. So, even technically, Port is an
> > inaccurate term for this class. You might find other technical details
> > that make "Listener" slightly inaccurate, but it still just Makes
> > Sense to most people (I'm guessing -- DavidC_, after me using the word
> > "Port", and explaining that I'd rather prefer "listener", told me he
> > would've immediately understood what I was talking about if I had used
> > that term from the beginning).
> I'd be interested to hear more feedback on this.  Do folks generally think
> that "listener" makes more sense than "port"?
Well my misunderstanding comes from already having worked with
sockets. A tcp port is just a number attached to each packet. When you
want to make a server you call listen() on a bound port number. You listen
for people who want to talk to you. So you create a Listener.

By the way, spread.pb is neat.

name:       David Creswick
website:    http://braznet.com/david
jabber id:  davec at jabber.org

More information about the Twisted-Python mailing list