If you want to understand sockets, there's no excuse for not reading Beej's Guide to Network Programming [1]. It's C, not Python, but it covers all of the dirty details and explains <i>exactly</i> what's going on when you create a socket. For instance, this article never mentions that sockets are file descriptors — in Beej's article, it's right after the introduction (Section 2 [2]).<p>How does this article describe a socket?<p><pre><code> > sockets are the fundamental "things" behind any kind of network communications done by your computer"
</code></pre>
Not very helpful.<p>[1] <a href="http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html" rel="nofollow">http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html</a><p>[2] <a href="http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html#theory" rel="nofollow">http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html...</a>
Decent tutorial, though I find the official Python HOWTO to be a more thorough and appropriate introduction to sockets for the complete newbie...<p><a href="http://docs.python.org/howto/sockets.html" rel="nofollow">http://docs.python.org/howto/sockets.html</a>
I really highly recommend "Foundations of Python Network Programming" by Brandon Rhodes and John Goerzen. It's just one of the best technical books I've read, from the opening example onwards. <a href="http://www.apress.com/9781430230038" rel="nofollow">http://www.apress.com/9781430230038</a>
Shouldn't the first step be install <a href="http://www.zeromq.org/" rel="nofollow">http://www.zeromq.org/</a>? That is some seriously amazing stuff right there. Makes network programming (something I've avoided for years) almost trivial.