
On 2008.03.31 09:00:40 +0100, Simon Pickles wrote:
As I understand PB, a client can get the root object of a PBServerFactory, thru which it can call methods with the 'remote_' prefix. I'm not clear how this can work in the other direction.
The mind argument to Realm.requestAvatar holds a reference to the client object that the client passed to PBClientFactory.login You can stash that reference somewhere on the server side, and call callRemote on it later. http://twistedmatrix.com/projects/core/documentation/howto/cred.html
As for AMP, this seems similar - the client uses callRemote() to execute remote methods on the amp server.
And the server can use callRemote on a client's protocol object. I have a simple AMP chat example that demonstrates this: http://ripton.net/hg/ampchat -- David Ripton dripton@ripton.net