[Twisted-Python] Server/Client
Christian Simms
christian.simms at gmail.com
Wed Jun 20 09:01:03 MDT 2007
On 6/20/07, Delgado, Edgardo CIV NAVAIR 4.1.4.3 <edgardo.delgado at navy.mil>
wrote:
>
> 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
here<http://twistedmatrix.com/projects/core/documentation/howto/servers.html>and
when you receive a message you would create a client using
reactor.connectTCP(host, port, factory) as detailed
here<http://twistedmatrix.com/projects/core/documentation/howto/clients.html>to
then send the message.
Cheers,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20070620/5a47ad5e/attachment.html>
More information about the Twisted-Python
mailing list