File tree Expand file tree Collapse file tree 5 files changed +11
-17
lines changed
websocketpp/transport/asio Expand file tree Collapse file tree 5 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
206
206
endif ()
207
207
208
208
if (NOT Boost_USE_STATIC_LIBS )
209
- add_definitions (/ DBOOST_TEST_DYN_LINK )
209
+ add_definitions (- DBOOST_TEST_DYN_LINK )
210
210
endif ()
211
211
212
212
set (Boost_FIND_REQUIRED TRUE )
Original file line number Diff line number Diff line change @@ -311,9 +311,10 @@ class connection : public config::socket_type::socket_con_type {
311
311
* needed.
312
312
*/
313
313
timer_ptr set_timer (long duration, timer_handler callback) {
314
- timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>(
315
- lib::ref (*m_io_service),
316
- lib::asio::milliseconds (duration)
314
+ timer_ptr new_timer (
315
+ new lib::asio::steady_timer (
316
+ *m_io_service,
317
+ lib::asio::milliseconds (duration))
317
318
);
318
319
319
320
if (config::enable_multithreading) {
@@ -461,8 +462,7 @@ class connection : public config::socket_type::socket_con_type {
461
462
m_io_service = io_service;
462
463
463
464
if (config::enable_multithreading) {
464
- m_strand = lib::make_shared<lib::asio::io_service::strand>(
465
- lib::ref (*io_service));
465
+ m_strand.reset (new lib::asio::io_service::strand (*io_service));
466
466
}
467
467
468
468
lib::error_code ec = socket_con_type::init_asio (io_service, m_strand,
Original file line number Diff line number Diff line change @@ -195,8 +195,7 @@ class endpoint : public config::socket_type {
195
195
196
196
m_io_service = ptr;
197
197
m_external_io_service = true ;
198
- m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>(
199
- lib::ref (*m_io_service));
198
+ m_acceptor.reset (new lib::asio::ip::tcp::acceptor (*m_io_service));
200
199
201
200
m_state = READY;
202
201
ec = lib::error_code ();
@@ -688,9 +687,7 @@ class endpoint : public config::socket_type {
688
687
* @since 0.3.0
689
688
*/
690
689
void start_perpetual () {
691
- m_work = lib::make_shared<lib::asio::io_service::work>(
692
- lib::ref (*m_io_service)
693
- );
690
+ m_work.reset (new lib::asio::io_service::work (*m_io_service));
694
691
}
695
692
696
693
// / Clears the endpoint's perpetual flag, allowing it to exit when empty
@@ -854,8 +851,7 @@ class endpoint : public config::socket_type {
854
851
855
852
// Create a resolver
856
853
if (!m_resolver) {
857
- m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(
858
- lib::ref (*m_io_service));
854
+ m_resolver.reset (new lib::asio::ip::tcp::resolver (*m_io_service));
859
855
}
860
856
861
857
tcon->set_uri (u);
Original file line number Diff line number Diff line change @@ -168,8 +168,7 @@ class connection : public lib::enable_shared_from_this<connection> {
168
168
return socket::make_error_code (socket::error::invalid_state);
169
169
}
170
170
171
- m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(
172
- lib::ref (*service));
171
+ m_socket.reset (new lib::asio::ip::tcp::socket (*service));
173
172
174
173
if (m_socket_init_handler) {
175
174
m_socket_init_handler (m_hdl, *m_socket);
Original file line number Diff line number Diff line change @@ -193,8 +193,7 @@ class connection : public lib::enable_shared_from_this<connection> {
193
193
if (!m_context) {
194
194
return socket::make_error_code (socket::error::invalid_tls_context);
195
195
}
196
- m_socket = lib::make_shared<socket_type>(
197
- _WEBSOCKETPP_REF (*service),lib::ref (*m_context));
196
+ m_socket.reset (new socket_type (*service, *m_context));
198
197
199
198
if (m_socket_init_handler) {
200
199
m_socket_init_handler (m_hdl, get_socket ());
You can’t perform that action at this time.
0 commit comments