Spotted by Greg Kochanski <gpk@bell-labs.com>.
HOST = '' # Symbolic name meaning the local host
PORT = 50007 # Arbitrary non-privileged server
s = socket(AF_INET, SOCK_STREAM)
-s.bind(HOST, PORT)
+s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connected by', addr
HOST = 'daring.cwi.nl' # The remote host
PORT = 50007 # The same port as used by the server
s = socket(AF_INET, SOCK_STREAM)
-s.connect(HOST, PORT)
+s.connect((HOST, PORT))
s.send('Hello, world')
data = s.recv(1024)
s.close()
\end{verbatim}
\begin{seealso}
-\seemodule{SocketServer}{classes that simplify writing network servers}
+ \seemodule{SocketServer}{classes that simplify writing network servers}
\end{seealso}