如何将WebSockets集成到Cocoa应用程序中 [英] How to incorporate WebSockets into a Cocoa application

查看:106
本文介绍了如何将WebSockets集成到Cocoa应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个涉及聊天元素的Cocoa应用程序。我考虑的一种方法是使用Websockets来处理客户端 - 服务器通信。这将是特别可取的,因为聊天也将显示在网站上,并且使用Websockets可以使实现非常简单。



所以:可以使用WebView元素,并在其中使用Websockets? (我知道Safari不支持Websockets,所以我想这是不可能的)



没有,有任何Websocket客户端库C,Objective C,

解决方案



div>

这里是一个用于objective-c的websockets的实现



http://github.com/esad/zimt


I am developing a Cocoa application which involves a chat element. One approach I've considered is using Websockets to handle client-server communication. This would be particularly desirable because chats will also be displayed on a website, and using Websockets could make the implementation very simple.

So: would it be possible to use a WebView element, and use Websockets within it? (I know Safari doesn't support Websockets yet, so I imagine this is not possible?)

Failing that, are there any Websocket client libraries for C, Objective C, or any other language I could successfully embed within my application?

Suggestions welcomed.

解决方案

Here is an implementation of websockets for objective-c

http://github.com/esad/zimt

这篇关于如何将WebSockets集成到Cocoa应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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