[Twisted-Python] Server/Client

Christian Simms christian.simms at gmail.com
Wed Jun 20 11:01:03 EDT 2007

On 6/20/07, Delgado, Edgardo CIV NAVAIR <edgardo.delgado at navy.mil>
> I would like to build a server that when it gets a message on a specific
> port it will "forward" that message to another port.
> I.e. "Server1" listens on port 10000. When it gets data on port 10000 it
> will forward the data to "Server2" listening on port 15000.

Assuming you're using TCP, you could just create a server listening on a
port using reactor.listenTCP(port, factory) as detailed
when you receive a message you would create a client using
reactor.connectTCP(host, port, factory) as detailed
then send the message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20070620/5a47ad5e/attachment.htm 

More information about the Twisted-Python mailing list