(self,reason)
连接断开处理
连接断开处理
连接断开处理
def connectionLost(self,reason):
        '''连接断开处理
        '''
        log.msg('Client %d login out.'%(self.transport.sessionno))
        self.factory.doConnectionLost(self)
        self.factory.connmanager.dropConnectionByID(self.transport.sessionno)
def connectionLost ( self , reason ) : log . msg ( 'Client %d login out.' % ( self . transport . sessionno ) ) self . factory . doConnectionLost ( self ) self . factory . connmanager . dropConnectionByID ( self . transport . sessionno )