Skip to content

Instantly share code, notes, and snippets.

@Averroes
Created April 10, 2015 17:13
Show Gist options
  • Select an option

  • Save Averroes/59806879136176b440dc to your computer and use it in GitHub Desktop.

Select an option

Save Averroes/59806879136176b440dc to your computer and use it in GitHub Desktop.
event driven io explained
from socket import *
sock = socket(AF_INET, SOCK_DGRAM)
for x in range(40):
sock.sendto(str(x).encode('ascii'), ('localhost', 16000))
resp = sock.recvfrom(8192)
print(resp[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment