/examples/udpserver.py

https://bitbucket.org/prologic/circuits/ · Python · 10 lines · 5 code · 4 blank · 1 comment · 0 complexity · 673948938e1ecb5a635930d29563c00a MD5 · raw file

  1. #!/usr/bin/env python
  2. from circuits.net.sockets import UDPServer
  3. class EchoServer(UDPServer):
  4. def read(self, address, data):
  5. self.write(address, data.strip())
  6. EchoServer(8000).run()