Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sock.settimeout(1.0)
- sock.bind(...)
- while not done:
- try:
- data = sock.recv(1500)
- except timeout:
- continue
- sock.close()
- while not done:
- try:
- data = sock.recv(1500)
- except timeout:
- continue
- if not data:
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement