Update README.md
This commit is contained in:
parent
f1612ca988
commit
2f0677cda4
@ -14,7 +14,7 @@ Installation
|
|||||||
Use
|
Use
|
||||||
===
|
===
|
||||||
|
|
||||||
```
|
```swift
|
||||||
let socket = SocketIOClient(socketURL: "http://localhost:8080")
|
let socket = SocketIOClient(socketURL: "http://localhost:8080")
|
||||||
// let socket = SocketIOClient(socketURL: "https://localhost:8080", secure: true)
|
// let socket = SocketIOClient(socketURL: "https://localhost:8080", secure: true)
|
||||||
socket.on("connect") {data in
|
socket.on("connect") {data in
|
||||||
@ -53,7 +53,7 @@ socket.connect()
|
|||||||
```
|
```
|
||||||
|
|
||||||
Binary support is not guaranteed to work. All recieved data is encoded in base64 strings.
|
Binary support is not guaranteed to work. All recieved data is encoded in base64 strings.
|
||||||
```
|
```swift
|
||||||
// Sending binary
|
// Sending binary
|
||||||
socket.emit("testObject", args: [
|
socket.emit("testObject", args: [
|
||||||
"data": "Hello World".dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)!,
|
"data": "Hello World".dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)!,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user