home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Re TCP Ports -- and the little guy listening

  • Subject: Re: [OCLUG-Tech] Re TCP Ports -- and the little guy listening
  • From: "Brenda J. Butler" <bjb [ at ] istop [ dot ] com>
  • Date: Thu, 28 Jul 2005 01:15:55 -0400
On Wed, Jul 27, 2005 at 05:16:35PM -0400, Adrian Irving-Beer wrote:
> On Wed, Jul 27, 2005 at 04:19:20PM -0400, William Case wrote:
> 
> > Somehow I had got it fixed in my head that a TCP port was something
> > physical as are a serial or parallel port.
> >
> > All the "listening" metaphors now make sense.
> 
> Right.  In terms of listening, ports are simply a means of determining
> what service you're asking for.  Said service listens on that port.
> 
> Once connections are established, they're tracked independently.  It's
> the combination of source address, source port, target address, and
> target port that defines a TCP connection.
> 
> That's why an HTTP server can have hundreds of requests coming in at
> once, all with a destination port of 80, and yet still keep track of
> them all.  If each port had a single buffer, things would get messed
> up pretty fast. :)

The thing (eg apache) listening to a well-known port either answers very
fast, or sends a random port back to the client for the longer-duration
transaction and resumes listening on the well-known port.

If the server spent significant time answering via the well-known port,
then other people trying to access that service would not be able to
connect because it would be busy.

cheerio,
bjb