[Twisted-Python] RemoteReference decref

A aldoogy at gmail.com
Thu Aug 28 08:19:50 EDT 2008


Hi,
I'm still working on an Actionscript pb client,

and have run into a bit of a conundrum with RemoteReference which is 
using python's built-in __del__  to trigger a decref.
Actionscript doesn't have destructors so I will need to trigger the 
decref manually.

based on my capture of a clent/server converation I am thinking that the 
client could do this in proto_answer

s -:  ('version', 6)
r -:  ['version', 6]
r -:  ['message', 1, 'root', 'login', 1, ['tuple', 'alice'], ['dictionary']]
s -:  ('answer', 1, ['tuple', 
'x\x9b\x95\x1c\tJp\xe0\x96]\xf4\xdb\xeb\x13\t9', ('remote', 1)])
r -:  ['message', 2, 1, 'respond', 1, ['tuple', 
'\x06\x04\xf1vI\xfeP\xa0\xdfzl(\xd9\x7f!t', ['remote', 1]], ['dictionary']]
s -:  ('answer', 2, ('remote', 2))
r -:  ['decref', 1]
r -:  ['message', 3, 2, 'joinGroup', 1, ['tuple', '#lookingForFourth'], 
['dictionary']]
s -:  ('answer', 3, ('remote', 3))
r -:  ['decref', 2]
r -:  ['message', 4, 3, 'send', 1, ['tuple', 'You can call me Al.'], 
['dictionary']]
s -:  ('message', 1, 1, 'print', 1, ['tuple', '<alice> says: You can 
call me Al.'], ['dictionary'])
s -:  ('answer', 4, ['None'])
r -:  ['decref', 3]

Not sure where I get a reference to RemoteReference though.
any ideas ?










More information about the Twisted-Python mailing list