[Twisted-Python] Combine XMLRPC and PB in one server?

apocalypznow apocalypznow at gmail.com
Tue Jun 14 03:34:31 EDT 2005


How do you make a server that handles both XMLRPC and PB?

How do you do this as a service?

When I mean service, I mean as in the following code:

application = twisted.application.service.Application("pbserver")
myService = twisted.application.service.IServiceCollection(application)

p = portal.Portal(DefaultRealm())
dbu=twisted.cred.checkers.InMemoryUsernamePasswordDatabaseDontUse()
dbu.addUser("user1","pass1")
p.registerChecker(dbu)

myServer = 
twisted.application.internet.TCPServer(8080,pb.PBServerFactory(p))
myServer.setServiceParent(myService)





More information about the Twisted-Python mailing list