| Home | Libraries | People | FAQ | More

##### websocket::stream_base::timeout::keep_alive_pings

Automatic ping setting.

###### Synopsis

    bool keep_alive_pings;

###### Description

If the idle interval is set, this setting affects the behavior of the stream when no data is received for the timeout interval as follows:

- When `keep_alive_pings` is `true`, an idle ping will be sent automatically. If another timeout interval elapses with no received data then the connection will be closed. An outstanding read operation must be pending, which will complete immediately the error `beast::error::timeout`.
- When `keep_alive_pings` is `false`, the connection will be closed if there has been no activity. Both websocket message frames and control frames count as activity. An outstanding read operation must be pending, which will complete immediately the error `beast::error::timeout`.