多用户聊天中向多用户传输文件

编程入门 行业动态 更新时间:2024-10-14 08:22:33
本文介绍了多用户聊天中向多用户传输文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在一个聊天室中将文件发送给多个用户,以便向所有人广播我.到目前为止,我还没有在互联网上找到解决此问题的任何方法或任何帮助.

i want to send files to multiple users in a one chat room so that i will be broadcasted to everyone. so far i havent found anything or any help on internet which resolve this issue.

目前,我尝试将文件逐个发送给每个用户,但是我认为这不是一种有效的方法,因此,如果有人使用其他方法,请告诉我们.

currently what i tried is to send a single file to each users one by one but i think that is not an efficient way so if someone has another approach then please do let know.

我也尝试过使用si-filetransfer和bystream发送文件.我想socks5 bytestream在javascript中是不可能的,所以我还没有尝试过.

i have tried sending file using si-filetransfer and bystream also. socks5 bytestream is not possible in javascript i guess so i havent tried that.

我正在使用openfire服务器和stophe.js使用javascript和XMPP协议发送文件

i am using openfire server and stophe.js to send files using javascript and XMPP protocol

推荐答案

将文件上传到服务器(例如您的OpenFire服务器),用户可以从中下载文件.

Upload the file to a server (e.g. your OpenFire server) where users can download the file from.

要通知您的用户他们需要下载文件,请使用XEP-0066向他们发送节:带外数据或按照XEP-0071中的说明对节中的链接进行编码.

To notify your users that they need to download a file, send them a stanza using XEP-0066: Out of Band Data or encode the link in a stanza as described in XEP-0071.

参考:

  • xmpp/extensions/xep-0066.html

xmpp/extensions/xep-0071.html

更多推荐

多用户聊天中向多用户传输文件

本文发布于:2023-10-24 21:09:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1525013.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多用户   中向   传输文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!