MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    help!使用mirai-api-http 2.0的插件,要怎么同时启用多个http端口呢

    HTTP API和第三方SDK
    4
    6
    249
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 玲
      玲珑豆1 last edited by

      希望一个端口长期监听消息,一个端口发送消息
      虽然第二个端口用其它的adapter,写起来好像也不难,但是不想增加学习成本了,mirai的文档看起来太痛苦了

      1 Reply Last reply Reply Quote 0
      • RainChan
        RainChan 摸鱼 last edited by

        似乎没有这样的功能
        @ryoii

        1 Reply Last reply Reply Quote 0
        • Hoshino Tented
          Hoshino Tented ⭐2021⭐ last edited by

          没有这样的功能,不过可以搞个反代?

          1 Reply Last reply Reply Quote 0
          • 玲
            玲珑豆1 last edited by

            好的!多谢,我先看下反代,不行就用另外的adapter

            1 Reply Last reply Reply Quote 0
            • 玲
              玲珑豆1 last edited by

              还是我太萌新了。。因为把整个请求写在了函数内部,所以导致了套接字问题。。在公用的__init__下创建了一个requests.session()后就解决了,不需要使用多个端口

              1 Reply Last reply Reply Quote 1
              • ryoii
                ryoii 梦中的鸡翅 last edited by

                这个需求有点怪怪的

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact