Changeset 20005 for trunk/FACT++
- Timestamp:
- 11/18/20 14:42:04 (4 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Connection.cc
r16769 r20005 266 266 267 267 const int optval = 30; 268 269 #if BOOST_VERSION <107000 268 270 // First keep alive after 30s 269 271 setsockopt(native(), SOL_TCP, TCP_KEEPIDLE, &optval, sizeof(optval)); 270 272 // New keep alive after 30s 271 273 setsockopt(native(), SOL_TCP, TCP_KEEPINTVL, &optval, sizeof(optval)); 274 #else 275 // First keep alive after 30s 276 setsockopt(native_handle(), SOL_TCP, TCP_KEEPIDLE, &optval, sizeof(optval)); 277 // New keep alive after 30s 278 setsockopt(native_handle(), SOL_TCP, TCP_KEEPINTVL, &optval, sizeof(optval)); 279 #endif 272 280 273 281 if (fVerbose) -
trunk/FACT++/src/ConnectionSSL.cc
r19050 r20005 267 267 lowest_layer().set_option(boost::asio::socket_base::keep_alive(true)); 268 268 269 const int optval = 30; 269 const int optval = 30; 270 271 #if BOOST_VERSION <107000 270 272 // First keep alive after 30s 271 273 setsockopt(lowest_layer().native(), SOL_TCP, TCP_KEEPIDLE, &optval, sizeof(optval)); 272 274 // New keep alive after 30s 273 275 setsockopt(lowest_layer().native(), SOL_TCP, TCP_KEEPINTVL, &optval, sizeof(optval)); 276 #else 277 // First keep alive after 30s 278 setsockopt(lowest_layer().native_handle(), SOL_TCP, TCP_KEEPIDLE, &optval, sizeof(optval)); 279 // New keep alive after 30s 280 setsockopt(lowest_layer().native_handle(), SOL_TCP, TCP_KEEPINTVL, &optval, sizeof(optval)); 281 #endif 274 282 275 283 if (fVerbose) … … 521 529 522 530 ConnectionSSL::ConnectionSSL(ba::io_service& ioservice, ostream &out) : MessageImp(out), 523 ssl::context(ioservice, boost::asio::ssl::context::method::sslv23_client), stream(ioservice, *this),524 fLog(0), fVerbose(true), fDebugTx(false),531 ssl::context(ioservice, boost::asio::ssl::context::method::sslv23_client), 532 stream(ioservice, *this), fLog(0), fVerbose(true), fDebugTx(false), 525 533 fInTimeout(ioservice), fOutTimeout(ioservice), fConnectionTimer(ioservice), 526 534 fQueueSize(0), fConnectionStatus(kDisconnected)
Note:
See TracChangeset
for help on using the changeset viewer.