Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 987475c commit a7eaa41Copy full SHA for a7eaa41
1 file changed
Doc/howto/sockets.rst
@@ -208,10 +208,10 @@ length message::
208
totalsent = totalsent + sent
209
210
def myreceive(self):
211
- msg = ''
+ msg = b''
212
while len(msg) < MSGLEN:
213
chunk = self.sock.recv(MSGLEN-len(msg))
214
- if chunk == '':
+ if chunk == b'':
215
raise RuntimeError("socket connection broken")
216
msg = msg + chunk
217
return msg
0 commit comments