connectors/WAMP/__init__.py
changeset 2338 2c3222433244
parent 2006 c4ba142bf3fb
child 2339 48b4eba13064
equal deleted inserted replaced
2337:8689ce77076f 2338:2c3222433244
    67 def WAMP_connector_factory(uri, confnodesroot):
    67 def WAMP_connector_factory(uri, confnodesroot):
    68     """
    68     """
    69     WAMP://127.0.0.1:12345/path#realm#ID
    69     WAMP://127.0.0.1:12345/path#realm#ID
    70     WAMPS://127.0.0.1:12345/path#realm#ID
    70     WAMPS://127.0.0.1:12345/path#realm#ID
    71     """
    71     """
    72     servicetype, location = uri.split("://")
    72     scheme, location = uri.split("://")
    73     urlpath, realm, ID = location.split('#')
    73     urlpath, realm, ID = location.split('#')
    74     urlprefix = {"WAMP":  "ws",
    74     urlprefix = {"WAMP":  "ws",
    75                  "WAMPS": "wss"}[servicetype]
    75                  "WAMPS": "wss"}[scheme]
    76     url = urlprefix+"://"+urlpath
    76     url = urlprefix+"://"+urlpath
    77 
    77 
    78     def RegisterWampClient():
    78     def RegisterWampClient():
    79 
    79 
    80         # start logging to console
    80         # start logging to console