如何将WebSockets的成Cocoa应用程序 [英] How to incorporate WebSockets into a Cocoa application
问题描述
我开发一个Cocoa应用程序涉及一个聊天的元素。一种方法我认为是使用的WebSockets来处理客户端服务器通信。这将是特别可取的,因为聊天记录也将在网站上显示出来,并且使用的WebSockets可以使实现非常简单。
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.
所以:这将是可以使用web视图元件,并在其内使用WebSockets? (我知道Safari浏览器不支持WebSockets的,所以我想这是不可能的?)
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?)
如果做不到这一点,是否有C,目标C,或任何其他语言的任何的WebSocket客户端库,我可以我的应用程序中嵌入成功?
Failing that, are there any Websocket client libraries for C, Objective C, or any other language I could successfully embed within my application?
建议欢迎。
推荐答案
下面是对的WebSockets的Objective-C
Here is an implementation of websockets for objective-c
这篇关于如何将WebSockets的成Cocoa应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!