与XMPP进行群聊中的文件传输 [英] File transfer in group chat with XMPP

查看:285
本文介绍了与XMPP进行群聊中的文件传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在公开聊天时使用群聊.

I am using group chat with open fire.

我可以发送消息,但是如何使用Smack库将文件发送到组.

i can able to send messages but how to send file to group with Smack library.

我可以通过以下方式将文件发送给单个用户,但我不知道如何发送至群聊(MUC),因此房间中的所有用户都将收到该文件

i can able to send file to single user with below but i don't know how to send to group chat (MUC) so all users in room will receive that file

OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("usre2@myHost/Smack");

推荐答案

使用 XEP-0066:数据-这是对带有URL和说明的标准groupchat消息的小扩展.其他用户将收到该文件的链接. Smack库没有标准实现,但是非常简单.

Use XEP-0066: Out of Band Data - this is small extension to standard groupchat message with url and description. Other users will receive link to the file. Smack library does not have standard implementation, but it is very simple.

这篇关于与XMPP进行群聊中的文件传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆