Skip to content

Commit a1e3232

Browse files
committed
update README.md
1 parent 543a3c8 commit a1e3232

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ API
1515
===
1616
Constructor
1717
-----------
18-
`init(socketURL: String, opts:[String: AnyObject]? = nil)` - Constructs a new client for the given URL. opts can be omitted (will use default values.)
18+
`init(socketURL: String, opts:[String: AnyObject]? = nil)` - Constructs a new client for the given URL. opts can be omitted (will use default values. See example)
1919
Methods
2020
-------
2121
1. `socket.on(name:String, callback:((data:NSArray?, ack:AckEmitter?) -> Void))` - Adds a handler for an event. Items are passed by an array. `ack` can be used to send an ack when one is requested. See example.
@@ -41,7 +41,8 @@ let socket = SocketIOClient(socketURL: "https://localhost:8080", opts: [
4141
"reconnects": true, // default true
4242
"reconnectAttempts": 5, // default -1 (infinite tries)
4343
"reconnectWait": 5, // default 10
44-
"nsp": "swift" // connects to the specified namespace. Default is /
44+
"nsp": "swift", // connects to the specified namespace. Default is /
45+
"forcePolling": true // if true, the socket will only use XHR polling, default is false (polling/WebSockets)
4546
])
4647

4748
// Socket Events

0 commit comments

Comments
 (0)