[Twisted-Python] multiple log-in / perspective broker

Daniel Sank sank.daniel at gmail.com
Sat Dec 28 11:24:56 MST 2013


> In other words, you don't have to log in on the *root* pb object.
> Login is just a PB method call.  You can have a second portal
> wrapping a different realm handing out different avatars and you
> can log in to that portal the second time.

How can the client access that second Portal if it's not hooked up
using pb.PBServerFactory and reactor.listenTCP?

> I am imagining having a remotely accessible login() method on
> the avatar returned by the realm.

Ah, I think I understand this now. The first Avatar (the one that
lives in the Lobby) has a method like

remote_logIntoChatRoom(self, roomName, credentials, mind)

which will then invoke some kind of login method on another
Portal/Realm pair representing the specific chat room. What threw me
originally is that I didn't realize that it's ok to use the
Portal/Realm structure without a corresponding PBServerFactory and
listenTCP call.



More information about the Twisted-Python mailing list