mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-30 08:24:20 +00:00
fixed build with boost >= 1.70
This commit is contained in:
parent
e260fc3c35
commit
f9a159051d
@ -590,7 +590,11 @@ public:
|
|||||||
}
|
}
|
||||||
bool connect(const std::string& server, const std::string& port)
|
bool connect(const std::string& server, const std::string& port)
|
||||||
{
|
{
|
||||||
|
#if (BOOST_VERSION >= 107000) // boost >= 1.70
|
||||||
|
ip::tcp::resolver resolver(stream.get_executor().context());
|
||||||
|
#else
|
||||||
ip::tcp::resolver resolver(stream.get_io_service());
|
ip::tcp::resolver resolver(stream.get_io_service());
|
||||||
|
#endif
|
||||||
ip::tcp::resolver::query query(server.c_str(), port.c_str());
|
ip::tcp::resolver::query query(server.c_str(), port.c_str());
|
||||||
ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
|
ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
|
||||||
ip::tcp::resolver::iterator end;
|
ip::tcp::resolver::iterator end;
|
||||||
@ -677,7 +681,11 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
|
|||||||
const bool fUseSSL)
|
const bool fUseSSL)
|
||||||
{
|
{
|
||||||
// Accept connection
|
// Accept connection
|
||||||
|
#if (BOOST_VERSION >= 107000) // boost >= 1.70
|
||||||
|
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_executor().context(), context, fUseSSL);
|
||||||
|
#else
|
||||||
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
|
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
|
||||||
|
#endif
|
||||||
|
|
||||||
acceptor->async_accept(
|
acceptor->async_accept(
|
||||||
conn->sslStream.lowest_layer(),
|
conn->sslStream.lowest_layer(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user