V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xianyv
V2EX  ›  问与答

有大佬用过 jellyfin-sdk-kotlin 吗? 其中的 websocket 各种消息是如何触发的?

  •  
  •   xianyv · 169 天前 · 425 次点击
    这是一个创建于 169 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近在研究 jellyfin-sdk-kotlin,一直没搞明白 websocket 的各种消息是如何触发的,看 sdk 的支持列表里有 UserUpdateMessage,添加监听并且修改用户信息后,消息一直没有发送过来.

     runBlocking {
        println("Starting subscription")
    
        val connection = apiClient.ws()
        connection.addListener<UserUpdatedMessage>() {
            println("数据监听")
        }
    
        // Listen for messages
        // this automatically subscribes to activity log entries etc.
        connection.addGlobalListener { message ->
            println("Received $message")
        }
    
        awaitCancellation()
    }
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2423 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 05:22 · PVG 13:22 · LAX 22:22 · JFK 01:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.