通过XMPP或WebSocket的即时通讯 [英] instant messaging over xmpp or websocket

查看:209
本文介绍了通过XMPP或WebSocket的即时通讯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,我想在安卓/ iPhone的即时消息应用程序,并可能在将来支持VoIP和视频聊天项目的要求。

i have the project requirement in which i want to make an instant messaging app in android/iphone and may be in future it supports voip and video chatting.

现在我有2个选择

1)XMPP - 它是用于即时消息,这几乎是10岁的应用层协议,它有很多支持VOIP或者可以是视频聊天扩展,联机/脱机状态和许多其他的特征。它是由例如WhatsApp,FB,Skype公司等。

1) xmpp - it is application layer protocol for IM, which is almost 10 year old, and it has lot of extensions which support voip or may be video chatting, online/offline status and lot of other features. It is accepted by all big companies like whatsapp,fb,Skype etc

另外我听说,谷歌已经从这个协议,因为漏洞搬走了。

Also I heard that google has moved away from this protocol because of vulnerability.

2)的WebSocket - 它是TCP层协议,它提供了一个TCP连接全双工通信,它是新的,它是由IETF的标准2011.i不知道该议定书是否主要用于IM。但我知道,这是可以做到,因为它是在TCP层。我并没有看到或听到任何功能/比4种方法其他Web插座的扩展(即的OnOpen,OnClose中,和的onMessage的onError)。所以这意味着,如果我选择了这个,我必须做我自己的联机/脱机状态的方法(可能会在发送帧的每一个X秒/分钟),VOIP,消息传递信息和其他功能等。

2) websocket - it is tcp layer protocol which provides a full duplex communication over a single tcp connection and it’s new and it was standardised by IETF in 2011.i don’t know whether this protocol is mainly used for IM. but i know that it can be done as it is in tcp layer. And i didn’t saw or heard any features/extensions of web socket other than the 4 methods(i.e onOpen, onClose, onMessage and onError). so it means if i choose this i have to make my own methods of online/offline status(may be sending a frame in every "x" seconds/minute), voip, message delivery information and other features etc.

我很困惑,我选择哪一个,XMPP或网络插座,在开发中,服务器的处理成本,安全,会话处理管理,浏览器支持等方面。

I am confused, which one i choose, xmpp or web socket, in terms of development, server handling cost, security, session handling management, browser support etc.

如果我对这些2协议不对任何东西,那么请大家指正。

在此先感谢

推荐答案

谷歌没有发现XMPP中的漏洞。

Google didn't find a vulnerability in XMPP.

您可以使用草案,IETF-XMPP协议的WebSocket 使用XMPP过的WebSockets,这将很快一个RFC。

You can use XMPP over WebSockets using draft-ietf-xmpp-websocket, which will soon be an RFC.

这篇关于通过XMPP或WebSocket的即时通讯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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