web server - accept() method
дамјан г.
mk at net.mail.penguinista
Fri Nov 7 05:38:51 EST 2003
> Just trying to figure out what the accept() method in socket.py does.
On Unix you can check "man 2 accept", or even beter try to find the book
„UNIX Network Programming“ by Richard W. Stevens. Its a great book
> Here accept() returns newSock and addr. In my case "addr" holds the
> value something like: ('127.0.0.1', 2571). What is 2571? This value
> keeps changing each time i make a connection to above webserver. What
> does this mean?
That's the client address and port number.
> And also what is "newSock"? It holds value such as:
> <socket object, fd=4, family=2, type=1, protocol=0>
> What do i mean by this?
newsock is a "socket", this one you use for communicating with the client.
The original socket is a listening one only...
--
Дамјан (jabberID:damjan at bagra.net.mk)
The NOC says:
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc
More information about the Python-list
mailing list