摘要
WebRTC是近年来比较热门的技术,它允许开发者在Web应用中实现点对点的视频传输与数据传输。将这一技术与移动终端技术结合并应用到协同设计,能够让不同地区的协同设计人员通过网络进行实时交流。该技术关键在于建立一条对等点信道。然而,网络不佳或者多端通讯的存在可能导致信道建立失败,因此,本文提出一种延时重发模式来解决该问题。具体来说,请求方在发送SDP描述符后等待一段时间,若收到接收方的回复信息,则建立成功;否则,请求方重新发送信息,当发送5次仍未成功,则放弃连接。而且,目前大多数端对端的文件传输需要借助于服务器,这就意味着在传输大文件时需要提供高性能的服务器。对此,本文的解决办法是对文件进行分片处理,并通过WebRTC的对等点信道直接在端与端间传输,使得该过程不再依赖于服务器并充分利用客户端的上行带宽。实验结果表明,延时重发模式不仅能够保证信道在各种情况下的成功建立,而且能够高效、快速地在对等点间传输文件。
Recently, WebRTC is a popular technology which makes point to point video transmission and data transmission realiz- able in Web applications. When combining with mobile technologies and applied to collaborative design, designers in different ar- eas could communicate through network in real time. The key point of WebRTC is to establish a peer channel. However, when poor network or multiple communicating exists, the course may fail. Therefore, a delayed re-send mode was introduced to solve the first problem. Specifically, after supplicant sending SDP descriptors and waiting for a period of time, if the recipient could re- ceive the corresponding message, the channel is been connected, else the supplicant should re-send the message. If this process failed five times, the trail would be terminated. Moreover, most end-to-end file transfer relies on the server, which means that high performance servers should be supplied as transferring large files. As for this problem, the solution is to split the file into pieces and to transfer massage among terminals through WebRTC peer channel directly, which makes it no longer depends on the server, and takes full advantage of the upstream broadband of the client. It shows that delay and re-send mode can not only guar- antee a successful connection of channels, but also be able to transfer files efficiently and quickly between peers.
作者
王怀亭
梁正和
庄天龙
WANG Huai-ting L ZHUANG Tian-long(College of Computer and Information, Hohai University, Nanjing 211100, China)
出处
《计算机与现代化》
2017年第3期18-21,26,共5页
Computer and Modernization