差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
im:web:intro:basic [2019/07/02 10:28] zhangdong [常见问题] |
im:web:intro:basic [2019/12/25 08:29] lizg [添加回调函数] |
||
---|---|---|---|
行 6: | 行 6: | ||
var conn = {}; | var conn = {}; | ||
WebIM.config = config; | WebIM.config = config; | ||
- | conn = WebIM.conn = new WebIM.connection({ | + | conn = WebIM.conn = new WebIM.default.connection({ |
+ | appKey: WebIM.config.appkey, | ||
isHttpDNS: WebIM.config.isHttpDNS, | isHttpDNS: WebIM.config.isHttpDNS, | ||
isMultiLoginSessions: WebIM.config.isMultiLoginSessions, | isMultiLoginSessions: WebIM.config.isMultiLoginSessions, | ||
https: WebIM.config.https, | https: WebIM.config.https, | ||
url: WebIM.config.xmppURL, | url: WebIM.config.xmppURL, | ||
- | isAutoLogin: false, | + | apiUrl: WebIM.config.apiURL, |
+ | isAutoLogin: WebIM.config.isAutoLogin, | ||
heartBeatWait: WebIM.config.heartBeatWait, | heartBeatWait: WebIM.config.heartBeatWait, | ||
autoReconnectNumMax: WebIM.config.autoReconnectNumMax, | autoReconnectNumMax: WebIM.config.autoReconnectNumMax, | ||
行 65: | 行 67: | ||
console.log(list); | console.log(list); | ||
}, | }, | ||
+ | onRecallMessage: function(message){}, //收到撤回消息回调 | ||
onReceivedMessage: function(message){}, //收到消息送达服务器回执 | onReceivedMessage: function(message){}, //收到消息送达服务器回执 | ||
onDeliveredMessage: function(message){}, //收到消息送达客户端回执 | onDeliveredMessage: function(message){}, //收到消息送达客户端回执 | ||
行 147: | 行 150: | ||
Q: 是否支持重连?\\ | Q: 是否支持重连?\\ | ||
- | A: 支持,当连接不能建立时会尝试重新连接,连接次数可在config里配置。 | + | A: 支持。1.未使用DNS:当前连接不能建立时会尝试重新连接,连接次数可在config里配置;2.使用DNS:当前连接不能建立时,会根据DNSconfig的地址逐一尝试连接。 |
Q: ws有上行没有下行? \\ | Q: ws有上行没有下行? \\ |