This is called immediately after calling the constructor to store the keepalive settings to apply to the future sockets. This will set Thrift's keepalive setting as well. It must be called before anything will call createSocket().
| 212 | // Thrift's keepalive setting as well. It must be called before anything |
| 213 | // will call createSocket(). |
| 214 | void setKeepAliveOptions(int32_t probe_period_s, int32_t retry_period_s, |
| 215 | int32_t retry_count) { |
| 216 | keepalive_enabled_ = probe_period_s > 0; |
| 217 | ThriftServerSocketType::setKeepAlive(keepalive_enabled_); |
| 218 | keepalive_probe_period_s_ = probe_period_s; |
| 219 | keepalive_retry_period_s_ = retry_period_s; |
| 220 | keepalive_retry_count_ = retry_count; |
| 221 | } |
| 222 | |
| 223 | protected: |
| 224 | // Get a socket from the underlying TServerSocket / TSSLServerSocket type, then set the |