与Socket.IO的iPhone Objective-C套接字通信 [英] iPhone Objective-C socket communication with Socket.IO
问题描述
我正在开发某种大型多人棋盘游戏。我的解决方案是服务器上的node.js socket.io。我需要解决方案来实现某种objective-c套接字,它将与socket.io通信,以便以字符串形式发送和接收json对象。我不会将webkit与websocket一起使用。有可能吗?服务器将保持游戏状态,iphone客户端将向服务器发送动作并在服务器上接收更改。
I’m developing some sort of massive multiplayer board-game. My solution is node.js socket.io on server. I need solution for implementation some sort of objective-c socket which would communicate with socket.io for sending and receiving json objects as string. i won't use webkit with websocket. Is there any possibility? server will hold state of game, iphone clients will sending action to server and receiving changes on server back.
推荐答案
已编辑2015/03/19: Socket.IO们创建了自己的iOS库,支持Socket.IO v1.0 +。在此处获取: https://github.com/socketio/socket.io-client- swift
edited 2015/03/19: The Socket.IO guys created their own iOS library that supports Socket.IO v1.0+. Get it here: https://github.com/socketio/socket.io-client-swift
旧答案
我更新了fpotter的socket.io库以使用版本 0.7.2 - 0.9.x 。
它支持套接字和XHRpolling 。
I updated fpotter's socket.io library to work with version 0.7.2 - 0.9.x.
It supports sockets and XHRpolling.
https:// github。 com / pkyeck / socket.IO-objc
也许你想看看它。
这篇关于与Socket.IO的iPhone Objective-C套接字通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!