当前位置: 首页>>代码示例>>Python>>正文


Python WebSocketServerProtocol.onClose方法代码示例

本文整理汇总了Python中autobahn.websocket.WebSocketServerProtocol.onClose方法的典型用法代码示例。如果您正苦于以下问题:Python WebSocketServerProtocol.onClose方法的具体用法?Python WebSocketServerProtocol.onClose怎么用?Python WebSocketServerProtocol.onClose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在autobahn.websocket.WebSocketServerProtocol的用法示例。


在下文中一共展示了WebSocketServerProtocol.onClose方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: onClose

# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import onClose [as 别名]
    def onClose(self, wasClean, code, reason):
#        logline("ONCLOSE: %s" % reason)
        WebSocketServerProtocol.onClose(self, wasClean, code, reason)
        delkey = None
        for key in connections:
            if connections[key]['wsh'] == self:
                delkey = key
        if delkey:
            del connections[delkey]
            logline("jsdb client %s disconnected." % delkey)
开发者ID:rlgomes,项目名称:jsdb,代码行数:12,代码来源:jsdb.py

示例2: onClose

# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import onClose [as 别名]
    def onClose(self, wasClean, code, reason):
        """Connect closed, cleanup"""
        # base logs
        WebSocketServerProtocol.onClose(self, wasClean, code, reason)
        if self.client is None:
            if self.debug:
                log.msg("MSP430ServerProtocol.onClose - No Client type")
            return

        self.client.onClose(wasClean, code, reason)
开发者ID:zlalanne,项目名称:msp430-webcontrol,代码行数:12,代码来源:server_protocol.py

示例3: onClose

# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import onClose [as 别名]
 def onClose(self, wasClean, code, reason):
     print 'closed', self.peerstr
     WebSocketServerProtocol.onClose(self, wasClean,
                                     code, reason)
     self.factory.unregister(self)
开发者ID:lchi,项目名称:freshy-server,代码行数:7,代码来源:freshy-server.py

示例4: onClose

# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import onClose [as 别名]
 def onClose(self, wasClean, code, reason):
     print 'close ....'
     WebSocketServerProtocol.onClose(self, wasClean, code, reason)
开发者ID:nic562,项目名称:FileUpload,代码行数:5,代码来源:websocket.py

示例5: onClose

# 需要导入模块: from autobahn.websocket import WebSocketServerProtocol [as 别名]
# 或者: from autobahn.websocket.WebSocketServerProtocol import onClose [as 别名]
	def onClose(self, wasClean, code, reason):
		print 'close', reason, code
		#if self.player:
		#	self.player.connects.remove(self)
		return WebSocketServerProtocol.onClose(self, wasClean, code, reason)
开发者ID:forsaken1,项目名称:game,代码行数:7,代码来源:ws_connection.py


注:本文中的autobahn.websocket.WebSocketServerProtocol.onClose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。