runtime/WampClient.py
changeset 3440 3770ded5db5c
parent 3343 c6de1a6cb655
child 3750 f62625418bff
child 3856 054c4f1b2ea7
equal deleted inserted replaced
3439:2739fbd82569 3440:3770ded5db5c
    43 
    43 
    44 mandatoryConfigItems = ["ID", "active", "realm", "url"]
    44 mandatoryConfigItems = ["ID", "active", "realm", "url"]
    45 
    45 
    46 _transportFactory = None
    46 _transportFactory = None
    47 _WampSession = None
    47 _WampSession = None
    48 _PySrv = None
       
    49 WorkingDir = None
    48 WorkingDir = None
    50 
    49 
    51 # Find pre-existing project WAMP config file
    50 # Find pre-existing project WAMP config file
    52 _WampConf = None
    51 _WampConf = None
    53 _WampSecret = None
    52 _WampSecret = None
   365             if _WampSession.is_attached():
   364             if _WampSession.is_attached():
   366                 return "Attached"
   365                 return "Attached"
   367             return "Established"
   366             return "Established"
   368         return "Connecting"
   367         return "Connecting"
   369     return "Disconnected"
   368     return "Disconnected"
   370 
       
   371 
       
   372 def SetServer(pysrv):
       
   373     global _PySrv
       
   374     _PySrv = pysrv
       
   375 
   369 
   376 
   370 
   377 def PublishEvent(eventID, value):
   371 def PublishEvent(eventID, value):
   378     if getWampStatus() == "Attached":
   372     if getWampStatus() == "Attached":
   379         _WampSession.publish(text(eventID), value)
   373         _WampSession.publish(text(eventID), value)