Skip to content

Instantly share code, notes, and snippets.

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

  • Save Averroes/2a6fc54f5129ffe46458 to your computer and use it in GitHub Desktop.

Select an option

Save Averroes/2a6fc54f5129ffe46458 to your computer and use it in GitHub Desktop.
creating a udp server
from socket import socket, AF_INET, SOCK_DGRAM
s = socket(AF_INET, SOCK_DGRAM)
s.sendto(b'', ('localhost', 20000))
print(s.recvfrom(8192))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment