Skip to content

Instantly share code, notes, and snippets.

@Lukasa Lukasa/loop.py
Created Aug 15, 2016

Embed
What would you like to do?
Is this an event loop?
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
You can’t perform that action at this time.