Advertisement
Guest User

websocketpp.patch

a guest
Oct 29th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.11 KB | None | 0 0
  1. diff --git pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/connection.hpp pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/connection.hpp
  2. --- pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/connection.hpp
  3. +++ pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/connection.hpp
  4. @@ -311,9 +311,10 @@ public:
  5.       * needed.
  6.       */
  7.      timer_ptr set_timer(long duration, timer_handler callback) {
  8. -        timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>(
  9. -            lib::ref(*m_io_service),
  10. -            lib::asio::milliseconds(duration)
  11. +        timer_ptr new_timer(
  12. +            new lib::asio::steady_timer(
  13. +                *m_io_service,
  14. +                lib::asio::milliseconds(duration))
  15.          );
  16.  
  17.          if (config::enable_multithreading) {
  18. @@ -461,8 +462,7 @@ protected:
  19.          m_io_service = io_service;
  20.  
  21.          if (config::enable_multithreading) {
  22. -            m_strand = lib::make_shared<lib::asio::io_service::strand>(
  23. -                lib::ref(*io_service));
  24. +            m_strand.reset(new lib::asio::io_service::strand(*io_service));
  25.          }
  26.  
  27.          lib::error_code ec = socket_con_type::init_asio(io_service, m_strand,
  28. diff --git pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/endpoint.hpp pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/endpoint.hpp
  29. --- pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/endpoint.hpp
  30. +++ pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/endpoint.hpp
  31. @@ -191,8 +191,7 @@ public:
  32.  
  33.          m_io_service = ptr;
  34.          m_external_io_service = true;
  35. -        m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>(
  36. -            lib::ref(*m_io_service));
  37. +        m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service));
  38.  
  39.          m_state = READY;
  40.          ec = lib::error_code();
  41. @@ -660,9 +659,7 @@ public:
  42.       * @since 0.3.0
  43.       */
  44.      void start_perpetual() {
  45. -        m_work = lib::make_shared<lib::asio::io_service::work>(
  46. -            lib::ref(*m_io_service)
  47. -        );
  48. +        m_work.reset(new lib::asio::io_service::work(*m_io_service));
  49.      }
  50.  
  51.      /// Clears the endpoint's perpetual flag, allowing it to exit when empty
  52. @@ -826,8 +823,7 @@ protected:
  53.  
  54.          // Create a resolver
  55.          if (!m_resolver) {
  56. -            m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(
  57. -                lib::ref(*m_io_service));
  58. +            m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service));
  59.          }
  60.  
  61.          tcon->set_uri(u);
  62. diff --git pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/security/none.hpp pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/websocketpp/transport/asio/security/none.hpp
  63. --- pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/security/none.hpp
  64. +++ pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/security/none.hpp
  65. @@ -168,8 +168,7 @@ protected:
  66.              return socket::make_error_code(socket::error::invalid_state);
  67.          }
  68.  
  69. -        m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(
  70. -            lib::ref(*service));
  71. +        m_socket.reset(new lib::asio::ip::tcp::socket(*service));
  72.  
  73.          m_state = READY;
  74.  
  75. diff --git pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/security/tls.hpp pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/security/tls.hpp
  76. --- pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/security/tls.hpp
  77. +++ pokerth-1.1.2-rc/src/third_party/websocketpp/websocketpp/transport/asio/security/tls.hpp
  78. @@ -193,8 +193,7 @@ protected:
  79.          if (!m_context) {
  80.              return socket::make_error_code(socket::error::invalid_tls_context);
  81.          }
  82. -        m_socket = lib::make_shared<socket_type>(
  83. -            _WEBSOCKETPP_REF(*service),lib::ref(*m_context));
  84. +        m_socket.reset(new socket_type(*service, *m_context));
  85.  
  86.          m_io_service = service;
  87.          m_strand = strand;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement