Skip to content

Commit

Permalink
add "Activity timeout" to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimon4eg committed Jun 5, 2019
1 parent 14239cb commit 0311dad
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ NLogger::setLevel(NLogLevel::Debug);

Note: to use logging macroses you have to define `NLOGS_ENABLED`.

#### Websockets transport
### Websockets transport

Nakama C++ client has built-in support for WebSocket. This is available on all supported platforms.

Expand All @@ -328,6 +328,18 @@ For more code examples, have a look at:
* [NWebsocketCppRest](https://github.com/heroiclabs/nakama-cpp/blob/master/src/realtime/NWebsocketCppRest.h)
* [NCocosWebSocket](https://github.com/heroiclabs/nakama-cocos2d-x/blob/master/example/Classes/NakamaCocos2d/NCocosWebSocket.h)
#### Activity timeout
Built-in websocket transport supports "Activity timeout" feature - if no any message received from server during "Activity timeout" then connection will be closed. Set 0 to disable this feature (default value).
```cpp
rtClient->getTransport()->setActivityTimeout(20000); // 20 sec
```

You can change ping period on server - `ping_period_ms` parameter:

https://heroiclabs.com/docs/install-configuration/#socket

## Contribute

The development roadmap is managed as GitHub issues and pull requests are welcome. If you're interested to enhance the code please open an issue to discuss the changes or drop in and discuss it in the [community chat](https://gitter.im/heroiclabs/nakama).
Expand Down

0 comments on commit 0311dad

Please sign in to comment.