xcode Mac OS X 上的 Cocoa Websocket 服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15752477/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:06:30  来源:igfitidea点击:

Cocoa Websocket Server on Mac OS X

xcodemacoscocoawebsocket

提问by Jason Stallings

I'm porting my application from Windows to Mac using XCode. One thing my application does is it runs a WebSocket server for communication.

我正在使用 XCode 将我的应用程序从 Windows 移植到 Mac。我的应用程序做的一件事是运行 WebSocket 服务器进行通信。

I've seen many WebSocket client libraries on github, but I'm having trouble finding one that handles server communication.

我在 github 上看到了许多 WebSocket 客户端库,但是我很难找到一个处理服务器通信的库。

Can anyone point me in the right direction?

任何人都可以指出我正确的方向吗?

This is not a duplicate of: How to incorporate WebSockets into a Cocoa application

这不是重复: 如何将 WebSockets 合并到 Cocoa 应用程序中

That library is for the client side, I need something that handles the server side. Also my question is about developing a Mac OSX application, not an iOS application.

该库用于客户端,我需要处理服务器端的东西。另外我的问题是关于开发 Mac OSX 应用程序,而不是 iOS 应用程序。

I would prefer this to be a Objective-C solution, my application has many other requirements.

我更希望这是一个 Objective-C 解决方案,我的应用程序有许多其他要求。

采纳答案by mxcl

I wrote: https://github.com/mxcl/MBWebSocketServer

我写道:https: //github.com/mxcl/MBWebSocketServer

Might be useful for you.

可能对你有用。

回答by joan

If you don't mind not to use Objective C, you can use Websockets libraryof the Dart Language. You can see a WebSockets server example here.

如果你不介意不使用 Objective C,你可以使用Dart 语言的Websockets 库。您可以在此处查看 WebSockets 服务器示例。