Hi

consider this for TCP, adapt to UDP

http://stackoverflow.com/questions/15640640/python-twisted-man-in-the-middle-implementation/15645169#15645169

Werner

On 9/12/14 11:26 AM, User User wrote:
Hi,
I have the codes below and I would like to know how is it possible to
send out data which came to "a" instance from "b" i mean data to port
2000 go out from port "2001" !?

Is there anybody listening on port 2000?


class fact(DatagramProtocol):
     def datagramReceived(self, datagram, addr):
         self.transport.write( datagram, some_where )

a = reactor.listenUDP(2001, fact())
b = reactor.listenUDP(2002, fact())




_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python



_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to