update readme
This commit is contained in:
parent
e567067d44
commit
5e1dc53304
@ -5,6 +5,8 @@ Socket.IO-client for iOS/OS X.
|
|||||||
|
|
||||||
##Example
|
##Example
|
||||||
```swift
|
```swift
|
||||||
|
import SocketIO
|
||||||
|
|
||||||
let socket = SocketIOClient(socketURL: NSURL(string: "http://localhost:8080")!, config: [.Log(true), .ForcePolling(true)])
|
let socket = SocketIOClient(socketURL: NSURL(string: "http://localhost:8080")!, config: [.Log(true), .ForcePolling(true)])
|
||||||
|
|
||||||
socket.on("connect") {data, ack in
|
socket.on("connect") {data, ack in
|
||||||
@ -26,6 +28,7 @@ socket.connect()
|
|||||||
|
|
||||||
##Objective-C Example
|
##Objective-C Example
|
||||||
```objective-c
|
```objective-c
|
||||||
|
@import SocketIO;
|
||||||
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost:8080"];
|
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost:8080"];
|
||||||
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"forcePolling": @YES}];
|
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"forcePolling": @YES}];
|
||||||
|
|
||||||
@ -115,13 +118,13 @@ Import the module:
|
|||||||
|
|
||||||
Swift:
|
Swift:
|
||||||
```swift
|
```swift
|
||||||
import SocketIOClientSwift
|
import SocketIO
|
||||||
```
|
```
|
||||||
|
|
||||||
Objective-C:
|
Objective-C:
|
||||||
|
|
||||||
```Objective-C
|
```Objective-C
|
||||||
@import SocketIOClientSwift;
|
@import SocketIO;
|
||||||
```
|
```
|
||||||
|
|
||||||
CocoaSeeds
|
CocoaSeeds
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user