Ignore:
Timestamp:
11/18/20 14:42:04 (4 years ago)
Author:
tbretz
Message:
The API in boost 1.70 changed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/ConnectionSSL.cc

    r19050 r20005  
    267267        lowest_layer().set_option(boost::asio::socket_base::keep_alive(true));
    268268
    269         const int optval = 30;
     269        const int optval = 30;
     270
     271#if BOOST_VERSION <107000
    270272        // First keep alive after 30s
    271273        setsockopt(lowest_layer().native(), SOL_TCP, TCP_KEEPIDLE, &optval, sizeof(optval));
    272274        // New keep alive after 30s
    273275        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
    274282
    275283        if (fVerbose)
     
    521529
    522530ConnectionSSL::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),
     531ssl::context(ioservice, boost::asio::ssl::context::method::sslv23_client),
     532stream(ioservice, *this), fLog(0), fVerbose(true), fDebugTx(false),
    525533fInTimeout(ioservice), fOutTimeout(ioservice), fConnectionTimer(ioservice),
    526534fQueueSize(0), fConnectionStatus(kDisconnected)
Note: See TracChangeset for help on using the changeset viewer.