From eee545e2c522a833ddda38f1924926e65d31e5a6 Mon Sep 17 00:00:00 2001 From: "andrew.kuchling" Date: Wed, 9 Aug 2006 14:05:35 +0000 Subject: [PATCH] Add missing 'self' parameters git-svn-id: http://svn.python.org/projects/python/trunk@51170 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Doc/howto/sockets.tex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Doc/howto/sockets.tex b/Doc/howto/sockets.tex index 4da92a879..0607a933b 100644 --- a/Doc/howto/sockets.tex +++ b/Doc/howto/sockets.tex @@ -222,9 +222,11 @@ is a fixed length message: 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 @@ is a fixed length message: 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)) -- 2.11.4.GIT