transport.py 文件源码

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

项目:watchmen 作者: lycclsltt 项目源码 文件源码
def set_subsystem_handler(self, name, handler, *larg, **kwarg):
        """
        Set the handler class for a subsystem in server mode.  If a request
        for this subsystem is made on an open ssh channel later, this handler
        will be constructed and called -- see L{SubsystemHandler} for more
        detailed documentation.

        Any extra parameters (including keyword arguments) are saved and
        passed to the L{SubsystemHandler} constructor later.

        @param name: name of the subsystem.
        @type name: str
        @param handler: subclass of L{SubsystemHandler} that handles this
            subsystem.
        @type handler: class
        """
        try:
            self.lock.acquire()
            self.subsystem_table[name] = (handler, larg, kwarg)
        finally:
            self.lock.release()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号