本文整理汇总了Python中autobahn.wamp.WampServerFactory.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python WampServerFactory.__init__方法的具体用法?Python WampServerFactory.__init__怎么用?Python WampServerFactory.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类autobahn.wamp.WampServerFactory
的用法示例。
在下文中一共展示了WampServerFactory.__init__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url, debug = False):
WampServerFactory.__init__(self, url, debugWamp = debug)
self.setProtocolOptions(allowHixie76 = True)
## the key-value store resides on the factory object, since it is to
## be shared among all client connections
self.keyvalue = KeyValue("keyvalue.dat")
decimal.getcontext().prec = 20
示例2: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url, dbpool, services):
WampServerFactory.__init__(self, url, debug = False, debugWamp = False)
self.dbpool = dbpool
self.services = services
self.stats = {'ws-connections': 0,
'ws-publications': 0,
'ws-dispatched-success': 0,
'ws-dispatched-failed': 0}
self.statsChanged = False
self.trackingCookies = {}
示例3: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, config):
self.config = config
WampServerFactory.__init__(self, config.wsuri, debugWamp = config.debug)
self.setProtocolOptions(failByDrop = False)
if config.skiputf8validate:
self.setProtocolOptions(utf8validateIncoming = False)
if config.allowunmasked:
self.setProtocolOptions(requireMaskedClientFrames = False)
print "Load/Latency Broker listening on %s [skiputf8validate = %s, allowunmasked = %s]" % (config.wsuri, config.skiputf8validate, config.allowunmasked)
示例4: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, config):
self.config = config
WampServerFactory.__init__(self, config.wsuri, debugWamp = config.debug)
self.setProtocolOptions(failByDrop = False)
if config.skiputf8validate:
self.setProtocolOptions(utf8validateIncoming = False)
if config.allowunmasked:
self.setProtocolOptions(requireMaskedClientFrames = False)
self.connectedClients = set()
print "Load/Latency Broker listening on %s [skiputf8validate = %s, allowunmasked = %s]" % (config.wsuri, config.skiputf8validate, config.allowunmasked)
def printstats():
print "%d clients connected" % len(self.connectedClients)
reactor.callLater(1, printstats)
printstats()
示例5: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url, dbpool, services):
WampServerFactory.__init__(self, url, debugApp = False)
self.dbpool = dbpool
self.services = services
self.restartRequired = False
示例6: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url):
WampServerFactory.__init__(self, url)
## the key-value store resides on the factory object, since it is to
## be shared among all client connections
self.keyvalue = KeyValue("keyvalue.dat")
示例7: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url, debugSerial = False, debugWs = False, debugWamp = False):
WampServerFactory.__init__(self, url, debug = debugWs, debugWamp = debugWamp)
self.debugSerial = debugSerial
self.mcuProtocol = McuProtocol(self)
示例8: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url, debugWamp, timeout):
self._reaper = None
self._connection_count = 0
self._timeout = timeout
WampServerFactory.__init__(self, url, debugWamp)
示例9: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url, debug=False, debugCodePaths=False, debugWamp=False, debugApp=False, externalPort=None):
self.games = []
WampServerFactory.__init__(self, url, debug=debug, debugCodePaths=debugCodePaths, externalPort=externalPort)
示例10: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, wsuri):
WampServerFactory.__init__(self, wsuri)
self.stepperWriter = StepperWriter.start().proxy()
self.lcdWriter = LcdWriter.start().proxy()
self.lcd = LcdRpc(self, self.lcdWriter);
self.stepper = StepperRpc(self, self.stepperWriter, self.lcdWriter);
示例11: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url):
WampServerFactory.__init__(self, url)
self.mcuProtocol = McuProtocol(self)
示例12: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, *args, **kwargs):
self.gateway = kwargs.pop('gateway')
WampServerFactory.__init__(self, *args, **kwargs)
self.connected_clients = []
示例13: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, testDb, testRunner, url, debug = False):
assert(verifyObject(ITestDb, testDb))
assert(verifyObject(ITestRunner, testRunner))
WampServerFactory.__init__(self, url, debug = True, debugWamp = True)
self._testDb = testDb
self._testRunner = testRunner
示例14: __init__
# 需要导入模块: from autobahn.wamp import WampServerFactory [as 别名]
# 或者: from autobahn.wamp.WampServerFactory import __init__ [as 别名]
def __init__(self, url, publish_uri, **kwargs):
WampServerFactory.__init__(self, url, **kwargs)
Game.register_cah_wamp_client(self)
Game.set_publish_uri(publish_uri)
self.startFactory() #hack!