97 lines
3.9 KiB
Diff
97 lines
3.9 KiB
Diff
diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/connection.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/connection.cpp
|
|
--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/connection.cpp 2020-01-31 12:03:07.000000000 +0100
|
|
+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/connection.cpp 2022-11-13 19:16:22.452241561 +0100
|
|
@@ -10,7 +10,6 @@
|
|
|
|
#include "connection.hpp"
|
|
#include <vector>
|
|
-#include <boost/bind.hpp>
|
|
#include "request_handler.hpp"
|
|
#include <osg/Notify>
|
|
|
|
@@ -39,9 +38,9 @@ void connection::start()
|
|
OSG_DEBUG << "RestHttpDevice :: connection::start" << std::endl;
|
|
|
|
socket_.async_read_some(asio::buffer(buffer_),
|
|
- boost::bind(&connection::handle_read, shared_from_this(),
|
|
- asio::placeholders::error,
|
|
- asio::placeholders::bytes_transferred));
|
|
+ std::bind(&connection::handle_read, shared_from_this(),
|
|
+ std::placeholders::_1,
|
|
+ std::placeholders::_2));
|
|
}
|
|
|
|
void connection::handle_read(const asio::error_code& e,
|
|
@@ -57,22 +56,22 @@ void connection::handle_read(const asio:
|
|
{
|
|
request_handler_.handle_request(request_, reply_);
|
|
asio::async_write(socket_, reply_.to_buffers(),
|
|
- boost::bind(&connection::handle_write, shared_from_this(),
|
|
- asio::placeholders::error));
|
|
+ std::bind(&connection::handle_write, shared_from_this(),
|
|
+ std::placeholders::_1));
|
|
}
|
|
else if (!result)
|
|
{
|
|
reply_ = reply::stock_reply(reply::bad_request);
|
|
asio::async_write(socket_, reply_.to_buffers(),
|
|
- boost::bind(&connection::handle_write, shared_from_this(),
|
|
- asio::placeholders::error));
|
|
+ std::bind(&connection::handle_write, shared_from_this(),
|
|
+ std::placeholders::_1));
|
|
}
|
|
else
|
|
{
|
|
socket_.async_read_some(asio::buffer(buffer_),
|
|
- boost::bind(&connection::handle_read, shared_from_this(),
|
|
- asio::placeholders::error,
|
|
- asio::placeholders::bytes_transferred));
|
|
+ std::bind(&connection::handle_read, shared_from_this(),
|
|
+ std::placeholders::_1,
|
|
+ std::placeholders::_2));
|
|
}
|
|
}
|
|
|
|
diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/server.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/server.cpp
|
|
--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/server.cpp 2020-01-31 12:03:07.000000000 +0100
|
|
+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/server.cpp 2022-11-13 19:16:22.452241561 +0100
|
|
@@ -9,7 +9,6 @@
|
|
//
|
|
|
|
#include "server.hpp"
|
|
-#include <boost/bind.hpp>
|
|
|
|
namespace http {
|
|
namespace server {
|
|
@@ -23,7 +22,7 @@ server::server(const std::string& addres
|
|
request_handler_(doc_root)
|
|
{
|
|
// Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
|
|
- asio::ip::tcp::resolver resolver(acceptor_.get_io_service());
|
|
+ asio::ip::tcp::resolver resolver(acceptor_.get_executor());
|
|
asio::ip::tcp::resolver::query query(address, port);
|
|
asio::ip::tcp::endpoint endpoint = *resolver.resolve(query);
|
|
acceptor_.open(endpoint.protocol());
|
|
@@ -31,8 +30,8 @@ server::server(const std::string& addres
|
|
acceptor_.bind(endpoint);
|
|
acceptor_.listen();
|
|
acceptor_.async_accept(new_connection_->socket(),
|
|
- boost::bind(&server::handle_accept, this,
|
|
- asio::placeholders::error));
|
|
+ std::bind(&server::handle_accept, this,
|
|
+ std::placeholders::_1));
|
|
}
|
|
|
|
void server::run()
|
|
@@ -56,8 +55,8 @@ void server::handle_accept(const asio::e
|
|
new_connection_.reset(new connection(
|
|
io_service_pool_.get_io_service(), request_handler_));
|
|
acceptor_.async_accept(new_connection_->socket(),
|
|
- boost::bind(&server::handle_accept, this,
|
|
- asio::placeholders::error));
|
|
+ std::bind(&server::handle_accept, this,
|
|
+ std::placeholders::_1));
|
|
}
|
|
else
|
|
{
|