Update README.md
This commit is contained in:
parent
e53b56ca96
commit
7229a66a32
16
README.md
16
README.md
@ -10,3 +10,19 @@ Installation
|
|||||||
1. Requires linking [SocketRocket](https://github.com/square/SocketRocket) against your xcode project.
|
1. Requires linking [SocketRocket](https://github.com/square/SocketRocket) against your xcode project.
|
||||||
2. Create a bridging header for SocketRocket
|
2. Create a bridging header for SocketRocket
|
||||||
2. Copy the SwiftIO folder into your xcode project
|
2. Copy the SwiftIO folder into your xcode project
|
||||||
|
3.
|
||||||
|
|
||||||
|
Use
|
||||||
|
===
|
||||||
|
|
||||||
|
```
|
||||||
|
let socket = SocketIOClient(socketURL: "http://localhost:8080")
|
||||||
|
socket.on("connect") {data in
|
||||||
|
println("socket connected")
|
||||||
|
socket.emit("testEcho")
|
||||||
|
socket.emit("testObject", args: [
|
||||||
|
"data": true
|
||||||
|
])
|
||||||
|
}
|
||||||
|
socket.connect()
|
||||||
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user