diff options
author | Georg Brandl <georg@python.org> | 2009-01-03 21:18:54 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-01-03 21:18:54 (GMT) |
commit | 48310cd3f2e02ced9ae836ccbcb67e9af3097d62 (patch) | |
tree | 04c86b387c11bfd4835a320e76bbb2ee24626e0d /Doc/howto/sockets.rst | |
parent | 3d3558a4653fcfcbdcbb75bda5d61e93c48f4d51 (diff) | |
download | cpython-48310cd3f2e02ced9ae836ccbcb67e9af3097d62.zip cpython-48310cd3f2e02ced9ae836ccbcb67e9af3097d62.tar.gz cpython-48310cd3f2e02ced9ae836ccbcb67e9af3097d62.tar.bz2 |
Remove trailing whitespace.
Diffstat (limited to 'Doc/howto/sockets.rst')
-rw-r--r-- | Doc/howto/sockets.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst index 2629d44..69130c4 100644 --- a/Doc/howto/sockets.rst +++ b/Doc/howto/sockets.rst @@ -1,5 +1,5 @@ **************************** - Socket Programming HOWTO + Socket Programming HOWTO **************************** :Author: Gordon McMillan @@ -62,7 +62,7 @@ your browser did something like the following:: #create an INET, STREAMing socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - #now connect to the web server on port 80 + #now connect to the web server on port 80 # - the normal http port s.connect(("www.mcmillan-inc.com", 80)) @@ -77,7 +77,7 @@ creates a "server socket". :: #create an INET, STREAMing socket serversocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM) - #bind the socket to a public host, + #bind the socket to a public host, # and a well-known port serversocket.bind((socket.gethostname(), 80)) #become a server socket @@ -184,7 +184,7 @@ Assuming you don't want to end the connection, the simplest solution is a fixed length message:: class mysocket: - """demonstration class only + """demonstration class only - coded for clarity, not efficiency """ @@ -340,9 +340,9 @@ you'll have little trouble with it in C. :: ready_to_read, ready_to_write, in_error = \ select.select( - potential_readers, - potential_writers, - potential_errs, + potential_readers, + potential_writers, + potential_errs, timeout) You pass ``select`` three lists: the first contains all sockets that you might |