update readme
This commit is contained in:
parent
9a05f6043b
commit
99ed93038f
@ -26,7 +26,7 @@ socket.connect()
|
|||||||
|
|
||||||
##Objective-C Example
|
##Objective-C Example
|
||||||
```objective-c
|
```objective-c
|
||||||
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:@"localhost:8080" options:nil];
|
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:@"localhost:8080" opts:nil];
|
||||||
|
|
||||||
[socket onObjectiveC:@"connect" callback:^(NSArray* data, void (^ack)(NSArray*)) {
|
[socket onObjectiveC:@"connect" callback:^(NSArray* data, void (^ack)(NSArray*)) {
|
||||||
NSLog(@"socket connected");
|
NSLog(@"socket connected");
|
||||||
@ -107,9 +107,9 @@ Objective-C:
|
|||||||
##API
|
##API
|
||||||
Constructors
|
Constructors
|
||||||
-----------
|
-----------
|
||||||
`init(socketURL: String, opts:NSDictionary? = nil)` - Constructs a new client for the given URL. opts can be omitted (will use default values) note: If your socket.io server is secure, you need to specify `https` in your socketURL.
|
`init(socketURL: String, opts: NSDictionary? = nil)` - Constructs a new client for the given URL. opts can be omitted (will use default values) note: If your socket.io server is secure, you need to specify `https` in your socketURL.
|
||||||
|
|
||||||
`convenience init(socketURL: String, options:NSDictionary?)` - Same as above, but meant for Objective-C. See Objective-C Example.
|
`convenience init(socketURL: String, opts: NSDictionary?)` - Same as above, but meant for Objective-C. See Objective-C Example.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
-------
|
-------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user