Merge pull request #527 from brian-dlee/master

Documents `disconnect` behavior in README
This commit is contained in:
Dalton 2018-07-20 16:50:59 -05:00 committed by GitHub
commit 70fd033db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,6 +160,12 @@ The disconnect method does what you would expect and closes the socket.
socket.disconnect()
```
The socket can be forcefully closed, by specifying a timeout (in milliseconds). A timeout of zero will also close the socket immediately without waiting on the server.
```swift
socket.disconnect(forceTimeout: 10, closeCode: CloseCode.normal.rawValue)
```
### isConnected
Returns if the socket is connected or not.