1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        StompleJavaScript消息傳輸框架

        聯(lián)合創(chuàng)作 · 2023-09-22 15:55

        Stomple 是一個基于 WebSocket 實現(xiàn)了 Stomp 消息傳輸框架協(xié)議的 JavaScript 包。

        示例代碼:

        var client = Stomple.create_client({
        url : "ws://localhost:61614/stomp",
        destination : "jms.topic.chat",
        login : "guest",
        passcode : "guest"
        });
        client.subscribe({
        success: function(frame) {//called if subscribe succeeds within timeout-period
        //subscribe succeeded... do something
        },
        failure: function(spec) {//called if subscribe fails or times out
        console.log(spec.reason);
        },
        handler: function(msg) {//called when a message arrived ('this' is scope - see below)
        this.received = msg.body;//"this" is "someObject"
        },
        scope: someObject
        });

        主要特點:

        1. 可定制以及回調功能
        2. 自動收取消息(client.autoReceipt)
        3.支持超時處理
        4. 事務管理
        5. 正確性

        瀏覽 25
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            h乳喷奶水被揉得受不了小说 | 欧美浓密荫毛视频 | 靠逼久久 | 人妻无码电影一区二区中文字幕 | free性videos另类重口 | 国产黄色特级片 | 午夜一级免费电影 | 日本三级影视 | 啊~嗯短裙直接进去h师生视频 | 色哟哟精品一区二区 |