Skip to content

Instantly share code, notes, and snippets.

@GaretJax
Created August 21, 2009 11:05
Show Gist options
  • Save GaretJax/171861 to your computer and use it in GitHub Desktop.
Save GaretJax/171861 to your computer and use it in GitHub Desktop.
proc = Processor(CalculatorHandler())
application = service.Application("My AMQP demo")
serviceCollection = service.IServiceCollection(application)
service = internet.TCPClient(host, port, AMQPClientFactory(proc))
service.setServiceParent(serviceCollection)
rpcservice = internet.TCPServer(9090, ThriftServerFactory(proc, TBinaryProtocol.TBinaryProtocolFactory()))
rpcservice.setServiceParent(serviceCollection)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment