def handleHello(self, csock, oname, obj, data):
"""
Hello messages are used to get the initial cache of
method names for the newly connected object.
"""
if verbose: print("GOT A HELLO")
self.daemon.increfObject(oname)
ret = {}
for name in dir(obj):
attr = getattr(obj, name, None)
if isinstance(attr, (types.MethodType, types.BuiltinMethodType, types.FunctionType, CobraMethod)):
ret[name] = True
try:
csock.sendMessage(COBRA_HELLO, version, ret)
except CobraClosedException:
pass
评论列表
文章目录