32
32
#include < vector>
33
33
#include < iterator>
34
34
#include < mutex>
35
- #include < boost/bind.hpp>
35
+ // #include <boost/bind.hpp>
36
+ #include < functional>
36
37
#include < network/constants.hpp>
37
38
38
39
#ifndef NETWORK_HTTP_SERVER_CONNECTION_HEADER_BUFFER_MAX_SIZE
@@ -213,7 +214,7 @@ class async_server_connection
213
214
}
214
215
215
216
write_headers_only (
216
- boost ::bind (&async_server_connection::do_nothing,
217
+ std ::bind (&async_server_connection::do_nothing,
217
218
async_server_connection::shared_from_this ()));
218
219
}
219
220
@@ -279,7 +280,7 @@ class async_server_connection
279
280
input_range input = boost::make_iterator_range (new_start,
280
281
read_buffer_.end ());
281
282
thread_pool ()
282
- .post (boost ::bind (callback,
283
+ .post (std ::bind (callback,
283
284
input,
284
285
boost::system::error_code (),
285
286
std::distance (new_start, data_end),
@@ -290,7 +291,7 @@ class async_server_connection
290
291
291
292
socket ().async_read_some (
292
293
boost::asio::buffer (read_buffer_),
293
- strand.wrap (boost ::bind (&async_server_connection::wrap_read_handler,
294
+ strand.wrap (std ::bind (&async_server_connection::wrap_read_handler,
294
295
async_server_connection::shared_from_this (),
295
296
callback,
296
297
boost::asio::placeholders::error,
@@ -315,7 +316,7 @@ class async_server_connection
315
316
data_end = read_buffer_.begin ();
316
317
std::advance (data_end, bytes_transferred);
317
318
thread_pool ()
318
- .post (boost ::bind (callback,
319
+ .post (std ::bind (callback,
319
320
boost::make_iterator_range (data_start, data_end),
320
321
ec,
321
322
bytes_transferred,
@@ -371,7 +372,7 @@ class async_server_connection
371
372
void read_more (state_t state) {
372
373
socket_.async_read_some (
373
374
boost::asio::buffer (read_buffer_),
374
- strand.wrap (boost ::bind (&async_server_connection::handle_read_data,
375
+ strand.wrap (std ::bind (&async_server_connection::handle_read_data,
375
376
async_server_connection::shared_from_this (),
376
377
state,
377
378
boost::asio::placeholders::error,
@@ -473,7 +474,7 @@ class async_server_connection
473
474
}
474
475
new_start = boost::end (result_range);
475
476
thread_pool ()
476
- .post (boost ::bind (handler,
477
+ .post (std ::bind (handler,
477
478
boost::cref (request_),
478
479
async_server_connection::shared_from_this ()));
479
480
return ;
@@ -502,7 +503,7 @@ class async_server_connection
502
503
boost::asio::async_write (
503
504
socket (),
504
505
boost::asio::buffer (bad_request, strlen (bad_request)),
505
- strand.wrap (boost ::bind (&async_server_connection::client_error_sent,
506
+ strand.wrap (std ::bind (&async_server_connection::client_error_sent,
506
507
async_server_connection::shared_from_this (),
507
508
boost::asio::placeholders::error,
508
509
boost::asio::placeholders::bytes_transferred)));
@@ -528,7 +529,7 @@ class async_server_connection
528
529
boost::asio::async_write (
529
530
socket (),
530
531
headers_buffer,
531
- strand.wrap (boost ::bind (&async_server_connection::handle_write_headers,
532
+ strand.wrap (std ::bind (&async_server_connection::handle_write_headers,
532
533
async_server_connection::shared_from_this (),
533
534
callback,
534
535
boost::asio::placeholders::error,
@@ -561,7 +562,7 @@ class async_server_connection
561
562
boost::system::error_code const & ec,
562
563
std::size_t bytes_transferred) {
563
564
// we want to forget the temporaries and buffers
564
- thread_pool ().post (boost ::bind (callback, ec));
565
+ thread_pool ().post (std ::bind (callback, ec));
565
566
}
566
567
567
568
template <class Range >
@@ -621,7 +622,7 @@ class async_server_connection
621
622
std::function<void (boost::system::error_code)> callback_function = callback;
622
623
623
624
std::function<void ()> continuation =
624
- boost ::bind (
625
+ std ::bind (
625
626
&async_server_connection::template write_vec_impl<
626
627
ConstBufferSeq,
627
628
std::function<void (
@@ -643,7 +644,7 @@ class async_server_connection
643
644
boost::asio::async_write (
644
645
socket_,
645
646
seq,
646
- boost ::bind (&async_server_connection::handle_write,
647
+ std ::bind (&async_server_connection::handle_write,
647
648
async_server_connection::shared_from_this (),
648
649
callback_function,
649
650
temporaries,
0 commit comments