Created
August 15, 2016 10:49
-
-
Save Lukasa/f8c9dcc553cd68a33c31ac434a0b8e42 to your computer and use it in GitHub Desktop.
Is this an event loop?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
def socket_loop(sock): | |
while True: | |
data = sock.recv(8192) | |
print(data) | |
if not data: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment