简体   繁体   English

Websocket协议哪个更好的方法? 本机ios或混合或Web应用程序?

[英]which is better way for websocket protocol? native ios or hybrid or web app?

I am wondering what would be the best way to transfering data from the server to the application. 我想知道将数据从服务器传输到应用程序的最佳方法是什么。

I am comfortable with javascript so web app would be a good one for publishing websocket communication. 我对javascript很满意,因此网络应用将是发布Websocket通信的好工具。

Sending a server data to the browser like safari is easy(web app). 像safari这样将服务器数据发送到浏览器很容易(网络应用)。

But I am not sure I can send a received data from the browser to my application. 但是我不确定是否可以将浏览器收到的数据发送到我的应用程序。

is anybody tried browser to application transfer? 有人尝试过将浏览器转移到应用程序吗?

if this is impposible, what do I need to publish websocket connection in ios native app or 如果这是不可能的,我需要在ios本机应用程序中发布websocket连接还是

hybrid app? 混合应用程序? I have almost zero knowledge about ios. 我对ios的了解几乎为零。 can you guys suggest good tutorials 你们能推荐好的教程吗

for ios and ios websocket? 适用于ios和ios websocket?

Using WebSockets from Javascript it is easy to send data from the browser to the server: 使用Javascript中的WebSockets,可以很容易地将数据从浏览器发送到服务器:

ws.send(data). 

WebSocket clients are also available in iOS. WebSocket客户端也可在iOS中使用。 See this answer. 看到这个答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM