mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 866|reply: 6
打印 prevThread nextThread

MCP 公网对讲接受消息多条接受显示

[copyURL]

12

主题

48

帖子

160

积分

member

Rank: 2

积分
160
jumpTo
owner
poston 2020-7-30 14:53 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
通过swImSend(OptionsImSend) 发送给只用用户,mcp 端接受多条数据并展示,请问如何解决?
reply

使用道具 report

0

主题

22

帖子

162

积分

member

Rank: 2

积分
162
sofa
poston 2020-7-30 15:33 | authorOnly
function sendinfomsg(data) {
       //这里是数组,只有一个data
        var msgItems = [data];
        var rc = session.swImSend({
            targetid: data.id,
            msgitems: msgItems,
            callback: sendMessageCb,
            pcallback: pcb,
            tag: data
        })
    }
   
function ConfSendWords() {
        var sendtext = document.getElementById("sendtextinfo").value;
        var userID = document.getElementById("PUID").value;
        var data = {
            id: userID,
            iType: 1,
            data: sendtext,
            nruid: "NRU_"
        };
        sendinfomsg(data);
    }

您可以用点对点发送的demo 测试一下:http://61.191.27.18:8081/demo/Point%20to%20point%20chat.html

reply agree Against

使用道具 report

12

主题

52

帖子

174

积分

member

Rank: 2

积分
174
bench
poston 2020-7-30 15:56 | authorOnly
shirtiny post on2020-7-30 15:33
function sendinfomsg(data) {
       //这里是数组,只有一个data
        var msgItems = [data];

就是用这个发送的,只给一个设备发送时没问题;
比如我给5个设备同时发送数据;那么每个设备接收到5条数据;给3个同时发,每个设备接收到3条消息
reply agree Against

使用道具 report

60

主题

1413

帖子

5799

积分

Moderator

Rank: 7Rank: 7Rank: 7

积分
5799
ground
poston 2020-7-30 16:32 | authorOnly
reply agree Against

使用道具 report

12

主题

52

帖子

174

积分

member

Rank: 2

积分
174
5#
poston 2020-7-30 16:36 | authorOnly
besovideo post on2020-7-30 16:32
看看这个帖子:
http://bbs.besovideo.com:8067/forum.php?mod=viewthread&tid=2309&extra=page%3D1

与这个问题无关吧?
reply agree Against

使用道具 report

0

主题

22

帖子

162

积分

member

Rank: 2

积分
162
6#
poston 2020-7-30 17:33 | authorOnly
abc post on2020-7-30 15:56
就是用这个发送的,只给一个设备发送时没问题;
比如我给5个设备同时发送数据;那么每个设备接收到5条数 ...

检查一下PUID?您的参数是什么,可以详细的说下吗?

本帖子中包含更多资源

pls login 才可以下载或查看,没有帐号?registerNow

x
reply agree Against

使用道具 report

12

主题

52

帖子

174

积分

member

Rank: 2

积分
174
7#
poston 2020-7-31 15:28 | authorOnly
shirtiny post on2020-7-30 17:33
检查一下PUID?您的参数是什么,可以详细的说下吗?

参数就是puid;比如给111,222,333三个设备发送;就循环调用了三次swImSend,第一次给111,第二次给222,第三次给333; 此时每个设备都收到3条消息
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-4-27 05:24 , Processed in 0.058590 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList