[Python-checkins] r51170 - python/trunk/Doc/howto/sockets.tex

andrew.kuchling python-checkins at python.org
Wed Aug 9 16:05:36 CEST 2006


Author: andrew.kuchling
Date: Wed Aug  9 16:05:35 2006
New Revision: 51170

Modified:
   python/trunk/Doc/howto/sockets.tex
Log:
Add missing 'self' parameters

Modified: python/trunk/Doc/howto/sockets.tex
==============================================================================
--- python/trunk/Doc/howto/sockets.tex	(original)
+++ python/trunk/Doc/howto/sockets.tex	Wed Aug  9 16:05:35 2006
@@ -222,9 +222,11 @@
                     socket.AF_INET, socket.SOCK_STREAM)
             else:
                 self.sock = sock
-        def connect(host, port):
+
+        def connect(self, host, port):
             self.sock.connect((host, port))
-        def mysend(msg):
+
+        def mysend(self, msg):
             totalsent = 0
             while totalsent < MSGLEN:
                 sent = self.sock.send(msg[totalsent:])
@@ -232,7 +234,8 @@
                     raise RuntimeError, \\
                         "socket connection broken"
                 totalsent = totalsent + sent
-        def myreceive():
+
+        def myreceive(self):
             msg = ''
             while len(msg) < MSGLEN:
                 chunk = self.sock.recv(MSGLEN-len(msg))


More information about the Python-checkins mailing list