summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-04-14 08:59:17 (GMT)
committerGeorg Brandl <georg@python.org>2013-04-14 08:59:17 (GMT)
commit1e6a3a2fe9c6402dc7c8c11dcbf1371beb73e05a (patch)
treeb6dcae92242ba80edc2296ff07df0ca627c608fd /Doc/howto
parentf221377d8b2098ec833156fec7916465b185859a (diff)
parenta204636b9190b8e69fe39b86291c2ba69913e310 (diff)
downloadcpython-1e6a3a2fe9c6402dc7c8c11dcbf1371beb73e05a.zip
cpython-1e6a3a2fe9c6402dc7c8c11dcbf1371beb73e05a.tar.gz
cpython-1e6a3a2fe9c6402dc7c8c11dcbf1371beb73e05a.tar.bz2
merge with 3.3
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/sockets.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst
index ca6528b..151e2c8 100644
--- a/Doc/howto/sockets.rst
+++ b/Doc/howto/sockets.rst
@@ -84,9 +84,11 @@ creates a "server socket"::
serversocket.listen(5)
A couple things to notice: we used ``socket.gethostname()`` so that the socket
-would be visible to the outside world. If we had used ``s.bind(('', 80))`` or
-``s.bind(('localhost', 80))`` or ``s.bind(('127.0.0.1', 80))`` we would still
-have a "server" socket, but one that was only visible within the same machine.
+would be visible to the outside world. If we had used ``s.bind(('localhost',
+80))`` or ``s.bind(('127.0.0.1', 80))`` we would still have a "server" socket,
+but one that was only visible within the same machine. ``s.bind(('', 80))``
+specifies that the socket is reachable by any address the machine happens to
+have.
A second thing to note: low number ports are usually reserved for "well known"
services (HTTP, SNMP etc). If you're playing around, use a nice high number (4