Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

socket io swift

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()


use https://github.com/socketio/socket.io-client-swift
for more info
 
PREVIOUS NEXT
Tagged: #socket #io #swift
ADD COMMENT
Topic
Name
1+4 =