Skip to content

Instantly share code, notes, and snippets.

@taicki
Created March 15, 2011 15:54
Show Gist options
  • Save taicki/870921 to your computer and use it in GitHub Desktop.
Save taicki/870921 to your computer and use it in GitHub Desktop.
import SocketServer
class Handler(SocketServer.BaseRequestHandler):
def handle(self):
data = self.request[0].strip()
print self.client_address[0], data
server = SocketServer.UDPServer(("0.0.0.0", 5140), Handler)
server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment