runtime/WampClient.py
branch#2486
changeset 2197 bec80ff35282
parent 2196 9017e830ae70
child 2198 4a5ac299f550
equal deleted inserted replaced
2196:9017e830ae70 2197:bec80ff35282
    99     @inlineCallbacks
    99     @inlineCallbacks
   100     def onJoin(self, details):
   100     def onJoin(self, details):
   101         global _WampSession
   101         global _WampSession
   102         _WampSession = self
   102         _WampSession = self
   103         ID = self.config.extra["ID"]
   103         ID = self.config.extra["ID"]
   104         regoption = None
       
   105 
   104 
   106         registerOptions = self.config.extra.get('registerOptions', None)
   105         registerOptions = self.config.extra.get('registerOptions', None)
   107         arguments = inspect.getargspec(types.RegisterOptions.__init__).args
   106         arguments = inspect.getargspec(types.RegisterOptions.__init__).args
   108         validRegisterOptions = getValidOptins(registerOptions, arguments)
   107         validRegisterOptions = getValidOptins(registerOptions, arguments)
   109         if validRegisterOptions:
   108         if validRegisterOptions:
   110             regoption = types.RegisterOptions(**validRegisterOptions)
   109             registerOptions = types.RegisterOptions(**validRegisterOptions)
   111             #print(_("Added custom register options"))
   110             #print(_("Added custom register options"))
   112 
   111 
   113         for name in ExposedCalls:
   112         for name in ExposedCalls:
   114             yield self.register(GetCallee(name), u'.'.join((ID, name)), regoption)
   113             yield self.register(GetCallee(name), u'.'.join((ID, name)), registerOptions)
   115 
   114 
   116         for name in SubscribedEvents:
   115         for name in SubscribedEvents:
   117             yield self.subscribe(GetCallee(name), unicode(name))
   116             yield self.subscribe(GetCallee(name), unicode(name))
   118 
   117 
   119         for func in DoOnJoin:
   118         for func in DoOnJoin: