mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Add missing 'self' parameters
This commit is contained in:
parent
13300f2bfa
commit
58aa6f70a1
1 changed files with 6 additions and 3 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue