Skip to content

Commit

Permalink
Update TUTORIAL.md
Browse files Browse the repository at this point in the history
  • Loading branch information
namuyan authored Jun 13, 2020
1 parent 24e0b16 commit 259283f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ generate random 16Mb binary and send.
>>> sock.sendall(data)
```

receive the data and check sha256. Be careful don't overflow buffer.
receive the data and check sha256.
```shell script
>>> from hashlib import sha256
>>> sock.settimeout(30.0)
>>> data = b''
>>> while True:
try:
... data += sock.recv(1024*1024*1024)
... data += sock.recv(8192)
... except Exception as e:
... print("timeout", e)
... break
Expand Down

0 comments on commit 259283f

Please sign in to comment.