network programming: how does s.accept() work?

Grant Edwards grante at visi.com
Wed Feb 27 10:27:17 EST 2008


On 2008-02-27, Micah Cowan <micah at cowan.name> wrote:
> Grant Edwards wrote:
>> On 2008-02-26, Micah Cowan <micah at cowan.name> wrote:
>> 
>>> 7stud, what you seem to be missing, and what I'm not sure if anyone has
>>> clarified for you (I have only skimmed the thread), is that in TCP,
>>> connections are uniquely identified by a /pair/ of sockets (where
>>> "socket" here means an address/port tuple, not a file descriptor).
>> 
>> Using the word "socket" as a name for an address/port tuple is
>> precisely what's causing all the confusion.  An address/port
>> tuple is simply not a socket from a python/Unix/C point of
>> view, and a socket is not an address/port tuple.
>
> FWIW, the word was used to mean the address/port tuple (RFC
> 793) before there was ever a python/Unix/C concept of
> "socket".

I could claim I was innocently unaware of that usage, though I
have read the RFCs, so I'll go with Steve Martin's classic
excuse: "I forgot."

> And I totally agree that it's confusing; but I submit that
> IETF has a stronger claim over the term than Unix/C/Python,
> which could have just stuck with "network descriptor" or some
> such. ;)

They probably had to come up with a system call name that was
uniquely identified by six characters or something like that.

-- 
Grant Edwards                   grante             Yow! Does someone from
                                  at               PEORIA have a SHORTER
                               visi.com            ATTENTION span than me?



More information about the Python-list mailing list