[Edu-sig] socket-module

Norman Vine nhv@cape.com
Mon, 26 Jun 2000 15:19:18 -0400


A[r]TA writes:
>
>I'm having a question. Maybe a strange one, but don't blame me. Just
>a newbie or something like that :-)
>
>If you're looking at the source from SOCKET.PY, you see a
>two classes. One for the socket-object and one for the file-descriptor.
>But, this module (in Windows) doesn't import anything.
>And par example:
>
>def accept(self):
>    sock, addr = self._sock.accept()
>    return _socketobject(sock), addr
>
>This is the accept method. Where can I see the 
>lowest-level-Python-code?
>I can't see the real code from HOW it's accepting the connection.
>Is this possible and how? It's basically for me to see the 
>TCP/IP-packages
>Python is creating....(very low level)
>

You have to go to the 'C' sourcefile    src / modules / socketmodule.c

Unfortunately because of the inherent system dependencies of socket
code this is one of the more difficult modules to follow.

socking-it-to-you-low-levelly

Norman