3
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
4
# See LICENSE for details.
6
from twisted.internet.protocol import DatagramProtocol
7
from twisted.internet import reactor
9
# Here's a UDP version of the simplest possible protocol
10
class EchoUDP(DatagramProtocol):
11
def datagramReceived(self, datagram, address):
12
self.transport.write(datagram, address)
15
reactor.listenUDP(8000, EchoUDP())
18
if __name__ == '__main__':