EndpointProcessor.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:lc_cloud 作者: refractionPOINT 项目源码 文件源码
def drain( self ):
        # Stop accepting new connections.
        if self.server is not None:
            self.server.close()

        # Ask all the clients to nicely disconnect.
        for aid, c in self.currentClients.items():
            try:
                c.sendFrame( HcpModuleId.HCP,
                             ( rSequence().addInt8( Symbols.base.OPERATION, 
                                                    HcpOperations.DISCONNECT ), ) )
            except:
                pass

        # Wait for everyone to be out.
        while 0 != self.nConnected:
            self.log( "still %d clients connected" % self.nConnected )
            self.sleep( 5 )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号