Merge branch 'master' of https://github.com/nuclearace/Socket.IO-Client-Swift
This commit is contained in:
commit
17c65ed3d5
@ -26,15 +26,17 @@ Events
|
||||
------
|
||||
1. `connect` - Emitted when on a successful connection.
|
||||
2. `disconnect` - Emitted when the connection is closed.
|
||||
3. `reconnect` - Emitted when the connection is starting to reconnect.
|
||||
4. `reconnectAttempt` - Emitted when attempting to reconnect.
|
||||
3. `error` - Emitted if the websocket encounters an error.
|
||||
4. `reconnect` - Emitted when the connection is starting to reconnect.
|
||||
5. `reconnectAttempt` - Emitted when attempting to reconnect.
|
||||
|
||||
```swift
|
||||
// opts can be omitted, will use default values
|
||||
let socket = SocketIOClient(socketURL: "https://localhost:8080", opts: [
|
||||
"reconnects": true, // default true
|
||||
"reconnectAttempts": 5, // default -1 (infinite tries)
|
||||
"reconnectWait": 5 // default 10
|
||||
"reconnectWait": 5, // default 10
|
||||
"nsp": "swift" // connects to the specified namespace. Default is /
|
||||
])
|
||||
|
||||
// Socket Events
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user