    def registerAdapter(self, adapter, events):
        '''
        @brief: 注册adapter
        @param adapter: 收发事件处理类
        @type adapter: AdapterProxy
        @param events: 注册事件
        @type events: int
        @return: None
        @rtype: None
        '''
        tarsLogger.debug('FDReactor:registerAdapter events : %d', events)
        events |= select.EPOLLET
        try:
            self.__ep.unregister(adapter.trans().getFd())
        except:
            pass
        self.__ep.register(adapter.trans().getFd(), events)
        self.__adapterTab[adapter.trans().getFd()] = adapter
@brief: 注册adapter
@param adapter: 收发事件处理类
@type adapter: AdapterProxy
@param events: 注册事件
@type events: int
@return: None
@rtype: None
biliup/Danmaku/tars/__trans.py