本文整理汇总了Python中SimpleWebSocketServer.SimpleWebSocketServer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleWebSocketServer.__init__方法的具体用法?Python SimpleWebSocketServer.__init__怎么用?Python SimpleWebSocketServer.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleWebSocketServer.SimpleWebSocketServer
的用法示例。
在下文中一共展示了SimpleWebSocketServer.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from SimpleWebSocketServer import SimpleWebSocketServer [as 别名]
# 或者: from SimpleWebSocketServer.SimpleWebSocketServer import __init__ [as 别名]
def __init__(self, host, port, websocketclass, certfile, keyfile, version = ssl.PROTOCOL_TLSv1):
SimpleWebSocketServer.__init__(self, host, port, websocketclass)
self.cerfile = certfile
self.keyfile = keyfile
self.version = version
示例2: __init__
# 需要导入模块: from SimpleWebSocketServer import SimpleWebSocketServer [as 别名]
# 或者: from SimpleWebSocketServer.SimpleWebSocketServer import __init__ [as 别名]
def __init__(self, system):
from . import skeleton
SimpleWebSocketServer.__init__(self, '', 9121, _DlalWebSocket)
self.root = _Root(
weakref.proxy(system),
skeleton,
lambda: FREE,
)
self.store = {}
self.thread = threading.Thread(target=_serve, args=(weakref.ref(self),))
self.thread.daemon = True
self.thread.start()
示例3: __init__
# 需要导入模块: from SimpleWebSocketServer import SimpleWebSocketServer [as 别名]
# 或者: from SimpleWebSocketServer.SimpleWebSocketServer import __init__ [as 别名]
def __init__(self, app):
SimpleWebSocketServer.__init__(self, '', 8080, SimpleEcho)
QObject.__init__(self)
th = threading.Thread(target=self.serveforever)
th.daemon = True
th.start()
self.app = app
for id, iesmas in app.stendas.iesmai.iteritems():
iesmas.stateChanged.connect(self.onSwitchChanged)
for train in app.trains:
train.signalChanged.connect(self.onTrainChanged)
train.speedChanged.connect(self.onTrainChanged)
for ruozas in app.stendas.ruozai:
ruozas.stateChanged.connect(self.onRoadChanged)
示例4: __init__
# 需要导入模块: from SimpleWebSocketServer import SimpleWebSocketServer [as 别名]
# 或者: from SimpleWebSocketServer.SimpleWebSocketServer import __init__ [as 别名]
def __init__(self, base):
SimpleWebSocketServer.__init__(self, base.bind_address, base.port, base.socket_imp_class, selectInterval=0.1)
self.base = base