Socket.IO 的开源 iOS 客户端,使用 swift 编写。
演示视频:http://fat.gfycat.com/EssentialBlueElectriceel.webm
使用示例:
import Foundation let socket = SocketIOClient(socketURL: "localhost:8880") socket.on("important message") {data, ack in println("Message for you! \(data?[0])") ack?("I got your message, and I'll send my response") socket.emit("response", "Hello!") } socket.connect()