本文整理汇总了Python中autobahn.websocket.WebSocketServerProtocol.connectionMade方法的典型用法代码示例。如果您正苦于以下问题:Python WebSocketServerProtocol.connectionMade方法的具体用法?Python WebSocketServerProtocol.connectionMade怎么用?Python WebSocketServerProtocol.connectionMade使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类autobahn.websocket.WebSocketServerProtocol
的用法示例。
在下文中一共展示了WebSocketServerProtocol.connectionMade方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
self.configuration = self.configuration
WebSocketServerProtocol.connectionMade(self)
self.lisaclientfactory = libs.LisaClientFactory(self)
if self.configuration['enable_secure_mode']:
self.conn = reactor.connectSSL(self.configuration['lisa_url'], self.configuration['lisa_engine_port_ssl'],
self.lisaclientfactory, CtxFactory()
)
else:
self.conn = reactor.connectTCP(self.configuration['lisa_url'],
self.configuration['lisa_engine_port'], self.lisaclientfactory)
示例2: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
WebSocketServerProtocol.connectionMade(self)
print "Connection made"
示例3: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
WebSocketServerProtocol.connectionMade(self)
FuzzingProtocol.connectionMade(self)
示例4: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
print 'connection made'
WebSocketServerProtocol.connectionMade(self)
示例5: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
WebSocketServerProtocol.connectionMade(self)
self.factory.onConnectionCountChanged()
示例6: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
WebSocketServerProtocol.connectionMade(self)
self.subscriber = Subscriber(self)
示例7: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
WebSocketServerProtocol.connectionMade(self)#always before your code
self.factory.connections.append(self)
示例8: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
WebSocketServerProtocol.connectionMade(self)
log.msg("Simulator connected...")
self.factory.lotus.addBlossomProvider(self)
self.factory.lotus.addLilypadProvider(self)
示例9: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
self.factory.register(self)
return WebSocketServerProtocol.connectionMade(self)
示例10: connectionMade
# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import connectionMade [as 别名]
def connectionMade(self):
WebSocketServerProtocol.connectionMade(self)
logging.info('Connection made from %s!', self.peerstr)
self.factory.clients.append(self)