diff options
Diffstat (limited to 'devel/websocketpp')
12 files changed, 514 insertions, 2 deletions
diff --git a/devel/websocketpp/Makefile b/devel/websocketpp/Makefile index 3e1cf71b16be..8e852a34e1bb 100644 --- a/devel/websocketpp/Makefile +++ b/devel/websocketpp/Makefile @@ -1,8 +1,9 @@ PORTNAME= websocketpp PORTVERSION= 0.8.2 +PORTREVISION= 1 CATEGORIES= devel -MAINTAINER= ports@FreeBSD.org +MAINTAINER= sigsegv@radiotube.org COMMENT= Header-only implementation of the WebSocket protocol WWW= https://www.zaphoyd.com/websocketpp/ @@ -10,11 +11,15 @@ LICENSE= MIT BSD3CLAUSE ZLIB LICENSE_COMB= multi LICENSE_FILE= ${WRKSRC}/COPYING -USES= cmake:insource cpe +TEST_DEPENDS= boost-libs>0:devel/boost-libs + +USES= cmake:insource,testing cpe CPE_VENDOR= zaphoyd USE_GITHUB= yes GH_ACCOUNT= zaphoyd +CMAKE_TESTING_ON= BUILD_TESTS + NO_ARCH= yes post-stage: # https://github.com/zaphoyd/websocketpp/issues/781 diff --git a/devel/websocketpp/files/patch-CMakeLists.txt b/devel/websocketpp/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..cd8749d1b099 --- /dev/null +++ b/devel/websocketpp/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2025-06-22 12:25:54 UTC ++++ CMakeLists.txt +@@ -152,7 +152,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES) + endif() + set (WEBSOCKETPP_PLATFORM_TLS_LIBS ssl crypto) + set (WEBSOCKETPP_BOOST_LIBS system thread) +- set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x -stdlib=libc++") # todo: is libc++ really needed here? ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++") # todo: is libc++ really needed here? + if (NOT APPLE) + add_definitions (-DNDEBUG -Wall -Wno-padded) # todo: should we use CMAKE_C_FLAGS for these? + endif () diff --git a/devel/websocketpp/files/patch-examples_echo__server__both_echo__server__both.cpp b/devel/websocketpp/files/patch-examples_echo__server__both_echo__server__both.cpp new file mode 100644 index 000000000000..62c0718d097c --- /dev/null +++ b/devel/websocketpp/files/patch-examples_echo__server__both_echo__server__both.cpp @@ -0,0 +1,11 @@ +--- examples/echo_server_both/echo_server_both.cpp.orig 2020-04-19 18:25:17 UTC ++++ examples/echo_server_both/echo_server_both.cpp +@@ -60,7 +60,7 @@ int main() { + int main() { + // set up an external io_service to run both endpoints on. This is not + // strictly necessary, but simplifies thread management a bit. +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + + // set up plain endpoint + server_plain endpoint_plain; diff --git a/devel/websocketpp/files/patch-examples_external__io__service_external__io__service.cpp b/devel/websocketpp/files/patch-examples_external__io__service_external__io__service.cpp new file mode 100644 index 000000000000..8fc665c72d95 --- /dev/null +++ b/devel/websocketpp/files/patch-examples_external__io__service_external__io__service.cpp @@ -0,0 +1,11 @@ +--- examples/external_io_service/external_io_service.cpp.orig 2020-04-19 18:25:17 UTC ++++ examples/external_io_service/external_io_service.cpp +@@ -59,7 +59,7 @@ int main() { + } + + int main() { +- asio::io_service service; ++ asio::io_context service; + + // Add a TCP echo server on port 9003 + tcp_echo_server custom_http_server(service, 9003); diff --git a/devel/websocketpp/files/patch-examples_external__io__service_tcp__echo__server.hpp b/devel/websocketpp/files/patch-examples_external__io__service_tcp__echo__server.hpp new file mode 100644 index 000000000000..5496feeeba41 --- /dev/null +++ b/devel/websocketpp/files/patch-examples_external__io__service_tcp__echo__server.hpp @@ -0,0 +1,28 @@ +--- examples/external_io_service/tcp_echo_server.hpp.orig 2020-04-19 18:25:17 UTC ++++ examples/external_io_service/tcp_echo_server.hpp +@@ -44,7 +44,7 @@ struct tcp_echo_session : websocketpp::lib::enable_sha + struct tcp_echo_session : websocketpp::lib::enable_shared_from_this<tcp_echo_session> { + typedef websocketpp::lib::shared_ptr<tcp_echo_session> ptr; + +- tcp_echo_session(asio::io_service & service) : m_socket(service) {} ++ tcp_echo_session(asio::io_context & service) : m_socket(service) {} + + void start() { + m_socket.async_read_some(asio::buffer(m_buffer, sizeof(m_buffer)), +@@ -72,7 +72,7 @@ struct tcp_echo_server { + }; + + struct tcp_echo_server { +- tcp_echo_server(asio::io_service & service, short port) ++ tcp_echo_server(asio::io_context & service, short port) + : m_service(service) + , m_acceptor(service, asio::ip::tcp::endpoint(asio::ip::tcp::v6(), port)) + { +@@ -92,6 +92,6 @@ struct tcp_echo_server { + start_accept(); + } + +- asio::io_service & m_service; ++ asio::io_context & m_service; + asio::ip::tcp::acceptor m_acceptor; + }; diff --git a/devel/websocketpp/files/patch-test_endpoint_endpoint.cpp b/devel/websocketpp/files/patch-test_endpoint_endpoint.cpp new file mode 100644 index 000000000000..efa78c73fc40 --- /dev/null +++ b/devel/websocketpp/files/patch-test_endpoint_endpoint.cpp @@ -0,0 +1,22 @@ +--- test/endpoint/endpoint.cpp.orig 2020-04-19 18:25:17 UTC ++++ test/endpoint/endpoint.cpp +@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE( initialize_server_asio_external + + BOOST_AUTO_TEST_CASE( initialize_server_asio_external ) { + websocketpp::server<websocketpp::config::asio> s; +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + s.init_asio(&ios); + } + +@@ -141,8 +141,8 @@ BOOST_AUTO_TEST_CASE( listen_after_listen_failure ) { + server1.init_asio(); + server2.init_asio(); + +- boost::asio::ip::tcp::endpoint ep1(boost::asio::ip::address::from_string("127.0.0.1"), 12345); +- boost::asio::ip::tcp::endpoint ep2(boost::asio::ip::address::from_string("127.0.0.1"), 23456); ++ boost::asio::ip::tcp::endpoint ep1(boost::asio::ip::make_address("127.0.0.1"), 12345); ++ boost::asio::ip::tcp::endpoint ep2(boost::asio::ip::make_address("127.0.0.1"), 23456); + + server1.listen(ep1, ec); + BOOST_CHECK(!ec); diff --git a/devel/websocketpp/files/patch-test_transport_asio_timers.cpp b/devel/websocketpp/files/patch-test_transport_asio_timers.cpp new file mode 100644 index 000000000000..33d49954446f --- /dev/null +++ b/devel/websocketpp/files/patch-test_transport_asio_timers.cpp @@ -0,0 +1,20 @@ +--- test/transport/asio/timers.cpp.orig 2020-04-19 18:25:17 UTC ++++ test/transport/asio/timers.cpp +@@ -54,7 +54,7 @@ void run_dummy_server(int port) { + using boost::asio::ip::tcp; + + try { +- boost::asio::io_service io_service; ++ boost::asio::io_context io_service; + tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v6(), port)); + tcp::socket socket(io_service); + +@@ -79,7 +79,7 @@ void run_test_timer(long value) { + + // Wait for the specified time period then fail the test + void run_test_timer(long value) { +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + boost::asio::deadline_timer t(ios,boost::posix_time::milliseconds(value)); + boost::system::error_code ec; + t.wait(ec); diff --git a/devel/websocketpp/files/patch-test_transport_integration.cpp b/devel/websocketpp/files/patch-test_transport_integration.cpp new file mode 100644 index 000000000000..b3ed7f70f733 --- /dev/null +++ b/devel/websocketpp/files/patch-test_transport_integration.cpp @@ -0,0 +1,46 @@ +--- test/transport/integration.cpp.orig 2020-04-19 18:25:17 UTC ++++ test/transport/integration.cpp +@@ -221,7 +221,7 @@ void run_dummy_server(int port) { + using boost::asio::ip::tcp; + + try { +- boost::asio::io_service io_service; ++ boost::asio::io_context io_service; + tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v6(), port)); + tcp::socket socket(io_service); + +@@ -248,13 +248,12 @@ void run_dummy_client(std::string port) { + using boost::asio::ip::tcp; + + try { +- boost::asio::io_service io_service; ++ boost::asio::io_context io_service; + tcp::resolver resolver(io_service); +- tcp::resolver::query query("localhost", port); +- tcp::resolver::iterator iterator = resolver.resolve(query); ++ tcp::resolver::results_type results = resolver.resolve("localhost", port); + tcp::socket socket(io_service); + +- boost::asio::connect(socket, iterator); ++ boost::asio::connect(socket, results); + for (;;) { + char data[512]; + boost::system::error_code ec; +@@ -361,7 +360,7 @@ class test_deadline_timer (public) + : m_timer(m_io_service, boost::posix_time::seconds(seconds)) + { + m_timer.async_wait(bind(&test_deadline_timer::expired, this, ::_1)); +- std::size_t (boost::asio::io_service::*run)() = &boost::asio::io_service::run; ++ std::size_t (boost::asio::io_context::*run)() = &boost::asio::io_context::run; + m_timer_thread = websocketpp::lib::thread(websocketpp::lib::bind(run, &m_io_service)); + } + ~test_deadline_timer() +@@ -379,7 +378,7 @@ class test_deadline_timer (public) + BOOST_FAIL("Test timed out"); + } + +- boost::asio::io_service m_io_service; ++ boost::asio::io_context m_io_service; + boost::asio::deadline_timer m_timer; + websocketpp::lib::thread m_timer_thread; + }; diff --git a/devel/websocketpp/files/patch-websocketpp_transport_asio_connection.hpp b/devel/websocketpp/files/patch-websocketpp_transport_asio_connection.hpp new file mode 100644 index 000000000000..30872545d7b5 --- /dev/null +++ b/devel/websocketpp/files/patch-websocketpp_transport_asio_connection.hpp @@ -0,0 +1,96 @@ +--- websocketpp/transport/asio/connection.hpp.orig 2020-04-19 18:25:17 UTC ++++ websocketpp/transport/asio/connection.hpp +@@ -86,9 +86,9 @@ class connection : public config::socket_type::socket_ + typedef typename response_type::ptr response_ptr; + + /// Type of a pointer to the Asio io_service being used +- typedef lib::asio::io_service * io_service_ptr; ++ typedef lib::asio::io_context * io_context_ptr; + /// Type of a pointer to the Asio io_service::strand being used +- typedef lib::shared_ptr<lib::asio::io_service::strand> strand_ptr; ++ typedef lib::shared_ptr<lib::asio::io_context::strand> strand_ptr; + /// Type of a pointer to the Asio timer class + typedef lib::shared_ptr<lib::asio::steady_timer> timer_ptr; + +@@ -458,11 +458,11 @@ class connection : public config::socket_type::socket_ + * + * @return Status code for the success or failure of the initialization + */ +- lib::error_code init_asio (io_service_ptr io_service) { ++ lib::error_code init_asio (io_context_ptr io_service) { + m_io_service = io_service; + + if (config::enable_multithreading) { +- m_strand.reset(new lib::asio::io_service::strand(*io_service)); ++ m_strand.reset(new lib::asio::io_context::strand(*io_service)); + } + + lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, +@@ -573,7 +573,7 @@ class connection : public config::socket_type::socket_ + lib::error_code const & ec) + { + if (ec == transport::error::operation_aborted || +- (post_timer && lib::asio::is_neg(post_timer->expires_from_now()))) ++ (post_timer && lib::asio::is_neg(post_timer->expiry() - std::chrono::steady_clock::now()))) + { + m_alog->write(log::alevel::devel,"post_init cancelled"); + return; +@@ -679,7 +679,7 @@ class connection : public config::socket_type::socket_ + // Whatever aborted it will be issuing the callback so we are safe to + // return + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(m_proxy_data->timer->expires_from_now())) ++ lib::asio::is_neg(m_proxy_data->timer->expiry() - std::chrono::steady_clock::now())) + { + m_elog->write(log::elevel::devel,"write operation aborted"); + return; +@@ -751,7 +751,7 @@ class connection : public config::socket_type::socket_ + // Whatever aborted it will be issuing the callback so we are safe to + // return + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(m_proxy_data->timer->expires_from_now())) ++ lib::asio::is_neg(m_proxy_data->timer->expiry() - std::chrono::steady_clock::now())) + { + m_elog->write(log::elevel::devel,"read operation aborted"); + return; +@@ -1012,18 +1012,18 @@ class connection : public config::socket_type::socket_ + */ + lib::error_code interrupt(interrupt_handler handler) { + if (config::enable_multithreading) { +- m_io_service->post(m_strand->wrap(handler)); ++ boost::asio::post(*m_io_service, m_strand->wrap(handler)); + } else { +- m_io_service->post(handler); ++ boost::asio::post(*m_io_service, handler); + } + return lib::error_code(); + } + + lib::error_code dispatch(dispatch_handler handler) { + if (config::enable_multithreading) { +- m_io_service->post(m_strand->wrap(handler)); ++ boost::asio::post(*m_io_service, m_strand->wrap(handler)); + } else { +- m_io_service->post(handler); ++ boost::asio::post(*m_io_service, handler); + } + return lib::error_code(); + } +@@ -1095,7 +1095,7 @@ class connection : public config::socket_type::socket_ + callback, lib::asio::error_code const & ec) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(shutdown_timer->expires_from_now())) ++ lib::asio::is_neg(shutdown_timer->expiry() - std::chrono::steady_clock::now())) + { + m_alog->write(log::alevel::devel,"async_shutdown cancelled"); + return; +@@ -1172,7 +1172,7 @@ class connection : public config::socket_type::socket_ + lib::shared_ptr<proxy_data> m_proxy_data; + + // transport resources +- io_service_ptr m_io_service; ++ io_context_ptr m_io_service; + strand_ptr m_strand; + connection_hdl m_connection_hdl; + diff --git a/devel/websocketpp/files/patch-websocketpp_transport_asio_endpoint.hpp b/devel/websocketpp/files/patch-websocketpp_transport_asio_endpoint.hpp new file mode 100644 index 000000000000..2650b9e6959c --- /dev/null +++ b/devel/websocketpp/files/patch-websocketpp_transport_asio_endpoint.hpp @@ -0,0 +1,207 @@ +--- websocketpp/transport/asio/endpoint.hpp.orig 2020-04-19 18:25:17 UTC ++++ websocketpp/transport/asio/endpoint.hpp +@@ -78,7 +78,7 @@ class endpoint : public config::socket_type { (public) + typedef typename transport_con_type::ptr transport_con_ptr; + + /// Type of a pointer to the ASIO io_service being used +- typedef lib::asio::io_service * io_service_ptr; ++ typedef lib::asio::io_context * io_context_ptr; + /// Type of a shared pointer to the acceptor being used + typedef lib::shared_ptr<lib::asio::ip::tcp::acceptor> acceptor_ptr; + /// Type of a shared pointer to the resolver being used +@@ -86,7 +86,7 @@ class endpoint : public config::socket_type { (public) + /// Type of timer handle + typedef lib::shared_ptr<lib::asio::steady_timer> timer_ptr; + /// Type of a shared pointer to an io_service work object +- typedef lib::shared_ptr<lib::asio::io_service::work> work_ptr; ++ typedef lib::shared_ptr<lib::asio::executor_work_guard<lib::asio::io_context::executor_type>> work_ptr; + + /// Type of socket pre-bind handler + typedef lib::function<lib::error_code(acceptor_ptr)> tcp_pre_bind_handler; +@@ -95,7 +95,7 @@ class endpoint : public config::socket_type { (public) + explicit endpoint() + : m_io_service(NULL) + , m_external_io_service(false) +- , m_listen_backlog(lib::asio::socket_base::max_connections) ++ , m_listen_backlog(lib::asio::socket_base::max_listen_connections) + , m_reuse_addr(false) + , m_state(UNINITIALIZED) + { +@@ -135,7 +135,7 @@ class endpoint : public config::socket_type { (public) + , m_io_service(src.m_io_service) + , m_external_io_service(src.m_external_io_service) + , m_acceptor(src.m_acceptor) +- , m_listen_backlog(lib::asio::socket_base::max_connections) ++ , m_listen_backlog(lib::asio::socket_base::max_listen_connections) + , m_reuse_addr(src.m_reuse_addr) + , m_elog(src.m_elog) + , m_alog(src.m_alog) +@@ -182,7 +182,7 @@ class endpoint : public config::socket_type { (public) + * @param ptr A pointer to the io_service to use for asio events + * @param ec Set to indicate what error occurred, if any. + */ +- void init_asio(io_service_ptr ptr, lib::error_code & ec) { ++ void init_asio(io_context_ptr ptr, lib::error_code & ec) { + if (m_state != UNINITIALIZED) { + m_elog->write(log::elevel::library, + "asio::init_asio called from the wrong state"); +@@ -209,7 +209,7 @@ class endpoint : public config::socket_type { (public) + * + * @param ptr A pointer to the io_service to use for asio events + */ +- void init_asio(io_service_ptr ptr) { ++ void init_asio(io_context_ptr ptr) { + lib::error_code ec; + init_asio(ptr,ec); + if (ec) { throw exception(ec); } +@@ -230,9 +230,9 @@ class endpoint : public config::socket_type { (public) + // TODO: remove the use of auto_ptr when C++98/03 support is no longer + // necessary. + #ifdef _WEBSOCKETPP_CPP11_MEMORY_ +- lib::unique_ptr<lib::asio::io_service> service(new lib::asio::io_service()); ++ lib::unique_ptr<lib::asio::io_context> service(new lib::asio::io_context()); + #else +- lib::auto_ptr<lib::asio::io_service> service(new lib::asio::io_service()); ++ lib::auto_ptr<lib::asio::io_context> service(new lib::asio::io_context()); + #endif + init_asio(service.get(), ec); + if( !ec ) service.release(); // Call was successful, transfer ownership +@@ -252,9 +252,9 @@ class endpoint : public config::socket_type { (public) + // TODO: remove the use of auto_ptr when C++98/03 support is no longer + // necessary. + #ifdef _WEBSOCKETPP_CPP11_MEMORY_ +- lib::unique_ptr<lib::asio::io_service> service(new lib::asio::io_service()); ++ lib::unique_ptr<lib::asio::io_context> service(new lib::asio::io_context()); + #else +- lib::auto_ptr<lib::asio::io_service> service(new lib::asio::io_service()); ++ lib::auto_ptr<lib::asio::io_context> service(new lib::asio::io_context()); + #endif + init_asio( service.get() ); + // If control got this far without an exception, then ownership has successfully been taken +@@ -375,7 +375,7 @@ class endpoint : public config::socket_type { (public) + * + * @return A reference to the endpoint's io_service + */ +- lib::asio::io_service & get_io_service() { ++ lib::asio::io_context & get_io_service() { + return *m_io_service; + } + +@@ -558,9 +558,9 @@ class endpoint : public config::socket_type { (public) + { + using lib::asio::ip::tcp; + tcp::resolver r(*m_io_service); +- tcp::resolver::query query(host, service); +- tcp::resolver::iterator endpoint_iterator = r.resolve(query); +- tcp::resolver::iterator end; ++ tcp::resolver::results_type endpoints = r.resolve(host, service); ++ auto endpoint_iterator = endpoints.begin(); ++ auto end = endpoints.end(); + if (endpoint_iterator == end) { + m_elog->write(log::elevel::library, + "asio::listen could not resolve the supplied host or service"); +@@ -666,7 +666,7 @@ class endpoint : public config::socket_type { (public) + + /// wraps the reset method of the internal io_service object + void reset() { +- m_io_service->reset(); ++ m_io_service->restart(); + } + + /// wraps the stopped method of the internal io_service object +@@ -687,7 +687,7 @@ class endpoint : public config::socket_type { (public) + * @since 0.3.0 + */ + void start_perpetual() { +- m_work.reset(new lib::asio::io_service::work(*m_io_service)); ++ m_work.reset(new lib::asio::executor_work_guard<lib::asio::io_context::executor_type>(lib::asio::make_work_guard(*m_io_service))); + } + + /// Clears the endpoint's perpetual flag, allowing it to exit when empty +@@ -883,8 +883,6 @@ class endpoint : public config::socket_type { (public) + port = pu->get_port_str(); + } + +- tcp::resolver::query query(host,port); +- + if (m_alog->static_test(log::alevel::devel)) { + m_alog->write(log::alevel::devel, + "starting async DNS resolve for "+host+":"+port); +@@ -905,7 +903,7 @@ class endpoint : public config::socket_type { (public) + + if (config::enable_multithreading) { + m_resolver->async_resolve( +- query, ++ host, port, + tcon->get_strand()->wrap(lib::bind( + &type::handle_resolve, + this, +@@ -918,7 +916,7 @@ class endpoint : public config::socket_type { (public) + ); + } else { + m_resolver->async_resolve( +- query, ++ host, port, + lib::bind( + &type::handle_resolve, + this, +@@ -966,10 +964,10 @@ class endpoint : public config::socket_type { (public) + + void handle_resolve(transport_con_ptr tcon, timer_ptr dns_timer, + connect_handler callback, lib::asio::error_code const & ec, +- lib::asio::ip::tcp::resolver::iterator iterator) ++ lib::asio::ip::tcp::resolver::results_type results) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(dns_timer->expires_from_now())) ++ lib::asio::is_neg(dns_timer->expiry() - std::chrono::steady_clock::now())) + { + m_alog->write(log::alevel::devel,"async_resolve cancelled"); + return; +@@ -987,8 +985,8 @@ class endpoint : public config::socket_type { (public) + std::stringstream s; + s << "Async DNS resolve successful. Results: "; + +- lib::asio::ip::tcp::resolver::iterator it, end; +- for (it = iterator; it != end; ++it) { ++ lib::asio::ip::tcp::resolver::results_type::iterator it, end; ++ for (it = results.begin(); it != results.end(); ++it) { + s << (*it).endpoint() << " "; + } + +@@ -1014,7 +1012,7 @@ class endpoint : public config::socket_type { (public) + if (config::enable_multithreading) { + lib::asio::async_connect( + tcon->get_raw_socket(), +- iterator, ++ results, + tcon->get_strand()->wrap(lib::bind( + &type::handle_connect, + this, +@@ -1027,7 +1025,7 @@ class endpoint : public config::socket_type { (public) + } else { + lib::asio::async_connect( + tcon->get_raw_socket(), +- iterator, ++ results, + lib::bind( + &type::handle_connect, + this, +@@ -1077,7 +1075,7 @@ class endpoint : public config::socket_type { (public) + connect_handler callback, lib::asio::error_code const & ec) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(con_timer->expires_from_now())) ++ lib::asio::is_neg(con_timer->expiry() - std::chrono::steady_clock::now())) + { + m_alog->write(log::alevel::devel,"async_connect cancelled"); + return; +@@ -1158,7 +1156,7 @@ class endpoint : public config::socket_type { (public) + tcp_init_handler m_tcp_post_init_handler; + + // Network Resources +- io_service_ptr m_io_service; ++ io_context_ptr m_io_service; + bool m_external_io_service; + acceptor_ptr m_acceptor; + resolver_ptr m_resolver; diff --git a/devel/websocketpp/files/patch-websocketpp_transport_asio_security_none.hpp b/devel/websocketpp/files/patch-websocketpp_transport_asio_security_none.hpp new file mode 100644 index 000000000000..664d82400f5c --- /dev/null +++ b/devel/websocketpp/files/patch-websocketpp_transport_asio_security_none.hpp @@ -0,0 +1,23 @@ +--- websocketpp/transport/asio/security/none.hpp.orig 2020-04-19 18:25:17 UTC ++++ websocketpp/transport/asio/security/none.hpp +@@ -63,9 +63,9 @@ class connection : public lib::enable_shared_from_this + typedef lib::shared_ptr<type> ptr; + + /// Type of a pointer to the Asio io_service being used +- typedef lib::asio::io_service* io_service_ptr; ++ typedef lib::asio::io_context* io_context_ptr; + /// Type of a pointer to the Asio io_service strand being used +- typedef lib::shared_ptr<lib::asio::io_service::strand> strand_ptr; ++ typedef lib::shared_ptr<lib::asio::io_context::strand> strand_ptr; + /// Type of the ASIO socket being used + typedef lib::asio::ip::tcp::socket socket_type; + /// Type of a shared pointer to the socket being used. +@@ -162,7 +162,7 @@ class connection : public lib::enable_shared_from_this + * @param strand A shared pointer to the connection's asio strand + * @param is_server Whether or not the endpoint is a server or not. + */ +- lib::error_code init_asio (io_service_ptr service, strand_ptr, bool) ++ lib::error_code init_asio (io_context_ptr service, strand_ptr, bool) + { + if (m_state != UNINITIALIZED) { + return socket::make_error_code(socket::error::invalid_state); diff --git a/devel/websocketpp/files/patch-websocketpp_transport_asio_security_tls.hpp b/devel/websocketpp/files/patch-websocketpp_transport_asio_security_tls.hpp new file mode 100644 index 000000000000..427d0510b603 --- /dev/null +++ b/devel/websocketpp/files/patch-websocketpp_transport_asio_security_tls.hpp @@ -0,0 +1,32 @@ +--- websocketpp/transport/asio/security/tls.hpp.orig 2020-04-19 18:25:17 UTC ++++ websocketpp/transport/asio/security/tls.hpp +@@ -72,9 +72,9 @@ class connection : public lib::enable_shared_from_this + /// Type of a shared pointer to the ASIO socket being used + typedef lib::shared_ptr<socket_type> socket_ptr; + /// Type of a pointer to the ASIO io_service being used +- typedef lib::asio::io_service * io_service_ptr; ++ typedef lib::asio::io_context * io_context_ptr; + /// Type of a pointer to the ASIO io_service strand being used +- typedef lib::shared_ptr<lib::asio::io_service::strand> strand_ptr; ++ typedef lib::shared_ptr<lib::asio::io_context::strand> strand_ptr; + /// Type of a shared pointer to the ASIO TLS context being used + typedef lib::shared_ptr<lib::asio::ssl::context> context_ptr; + +@@ -182,7 +182,7 @@ class connection : public lib::enable_shared_from_this + * @param strand A pointer to the connection's strand + * @param is_server Whether or not the endpoint is a server or not. + */ +- lib::error_code init_asio (io_service_ptr service, strand_ptr strand, ++ lib::error_code init_asio (io_context_ptr service, strand_ptr strand, + bool is_server) + { + if (!m_tls_init_handler) { +@@ -381,7 +381,7 @@ class connection : public lib::enable_shared_from_this + } + } + +- io_service_ptr m_io_service; ++ io_context_ptr m_io_service; + strand_ptr m_strand; + context_ptr m_context; + socket_ptr m_socket; |