在设备上的iOS websocket服务器

问题描述:

寻求实现iOS中的UIWebView与JavaScript之间的websocket通信到objective-c中的设备websockets服务器上的本地。任何人都看过一个示例代码集,用于在iOS设备上设置本地websocket服务器,以便Web视图的一半可以轻松地与本地容器进行交谈,反之亦然?在设备上的iOS websocket服务器

试试这个库https://github.com/robbiehanson/CocoaHTTPServer 它有一个带有websockets的MAC和IOS示例。

我制作了一个在iOS上运行的websocket服务器。它是libwebsockets的封装,代码位于github上:https://github.com/benlodotcom/BLWebSocketsServer