是的WebSocket是专门为浏览器只 [英] Is websocket is dedicated for browsers only

查看:284
本文介绍了是的WebSocket是专门为浏览器只的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想程序中使用第三方库的本地Objective-C和原生Android应用程序。我已经选择了图书馆和我已经在它进步。

I am trying to program a native Objective-C and Native Android application using 3rd Party libraries. I have already chosen the libraries and I am already progressing in it.

一个人在我的团队认为,目前在集中实施的网络浏览器的WebSocket,如果我们用这个第三方库从本地应用实现同样的也未必是稳定的。

One person in my team argues that the websocket currently implemented in concentration to web browsers, If we use this 3rd party libraries to implement the same from a native application it may not be stable.

他说,保持从本地移动应用程序的WebSocket连接可能是微不足道的,但WebKit浏览器已经不自然地,因此,我们应该考虑建立一个hybrod应用程序。

He says maintaining a websocket connectivity from a native mobile application could be trivial, But webkit browsers already does that naturally, therefore we should think about creating a hybrod app.

任何人都可以抛出对此有何评论?

Can anyone throw a comment on this?

推荐答案

的WebSockets可以通过任何客户端使用(读:应用程序),只要在客户端实现WebSocket协议

Websockets can be used by any client (read: "app"), as long as the client implements the Websocket protocol.

例如, SocketRocket 是一个Objective C库,可帮助您的iOS原生应用实现的WebSockets。

For example, SocketRocket is an Objective C library that helps you implement Websockets in iOS native apps.

有一个很好的文章 关于本机iOS和Android应用实施的WebSockets。

There's a nice article here about implementing Websockets in native iOS and Android apps.

我认为,如果没有的Webkit实现的WebSockets是一个更好的路要走。创建一个混合的应用程序可能会影响性能。如果你只使用一个功能(的WebSockets),Webkit的可能是太重了。

I think that implementing Websockets without Webkit is a better way to go. Creating a Hybrid app can impact performance. If you're using only one feature (websockets), Webkit might be too heavy.

唯一的问题是 - 你正在实施足够成熟的库?

The only question is - are the libraries you are implementing mature enough?

祝您好运!

这篇关于是的WebSocket是专门为浏览器只的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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