mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-30 00:50:48 +08:00
47 lines
998 B
C++
47 lines
998 B
C++
#pragma once
|
|
|
|
#if defined(ASIO_STANDALONE)
|
|
//MSVC : define environment path 'ASIO_STANDALONE_INCLUDE', e.g. 'E:\bdlibs\asio-1.10.6\include'
|
|
|
|
#include <asio.hpp>
|
|
#ifdef CINATRA_ENABLE_SSL
|
|
#include <asio/ssl.hpp>
|
|
#endif
|
|
#include <asio/steady_timer.hpp>
|
|
#include <asio/detail/noncopyable.hpp>
|
|
namespace boost
|
|
{
|
|
namespace asio
|
|
{
|
|
using namespace ::asio;
|
|
}
|
|
namespace system {
|
|
using ::std::error_code;
|
|
}
|
|
}
|
|
#else
|
|
#include <boost/asio.hpp>
|
|
#ifdef CINATRA_ENABLE_SSL
|
|
#include <boost/asio/ssl.hpp>
|
|
#endif
|
|
#include <boost/asio/steady_timer.hpp>
|
|
using namespace boost;
|
|
using tcp_socket = boost::asio::ip::tcp::socket;
|
|
#ifdef CINATRA_ENABLE_SSL
|
|
using ssl_socket = boost::asio::ssl::stream<boost::asio::ip::tcp::socket>;
|
|
#endif
|
|
#endif
|
|
|
|
#if __cplusplus > 201402L
|
|
#include <string_view>
|
|
using string_view = std::string_view;
|
|
#else
|
|
#ifdef ASIO_STANDALONE
|
|
#include "string_view.hpp"
|
|
using namespace nonstd;
|
|
#else
|
|
#include <boost/utility/string_view.hpp>
|
|
using string_view = boost::string_view;
|
|
#endif
|
|
#endif
|