Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Link with standard libraries instead of Boost#591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 9 commits intocpp-netlib:masterfromglynos:boostless
Feb 8, 2016
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
Replaced boost asio with standalone (and header only) asio (v 1.11.0).
  • Loading branch information
@glynos
glynos committedJan 31, 2016
commit8a0381e70b40a542f959ef4b8aaccd1174ee830c
3 changes: 3 additions & 0 deletions.gitmodules
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,3 +10,6 @@
[submodule "deps/cxxopts"]
path=deps/cxxopts
url=https://github.com/jarro2783/cxxopts.git
[submodule "deps/asio"]
path=deps/asio
url=https://github.com/chriskohlhoff/asio.git
5 changes: 5 additions & 0 deletionsCMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -91,6 +91,11 @@ if (Boost_FOUND)
add_definitions(-D_WIN32_WINNT=0x0501)
endif(WIN32)
include_directories(${Boost_INCLUDE_DIRS})

# Asio
add_definitions(-DASIO_HEADER_ONLY)
include_directories(deps/asio/asio/include)

enable_testing()
add_subdirectory(libs/network/src)
if (CPP-NETLIB_BUILD_TESTS)
Expand Down
1 change: 0 additions & 1 deletionboost/network/protocol/http/client.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@
#include<boost/network/protocol/http/response.hpp>
#include<boost/network/traits/ostringstream.hpp>

#include<boost/asio/io_service.hpp>
#include<boost/algorithm/string/classification.hpp>
#include<boost/algorithm/string/split.hpp>
#include<istream>
Expand Down
20 changes: 10 additions & 10 deletionsboost/network/protocol/http/client/async_impl.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,8 +11,8 @@
#include <thread>
#include <memory>
#include <functional>
#include <boost/asio/io_service.hpp>
#include <boost/asio/strand.hpp>
#include <asio/io_service.hpp>
#include <asio/strand.hpp>
#include <boost/network/protocol/http/traits/connection_policy.hpp>

namespace boost {
Expand All@@ -32,13 +32,13 @@ struct async_client
typedef typename string<Tag>::type string_type;

typedef std::function<void(boost::iterator_range<char const*> const&,
system::error_code const&)> body_callback_function_type;
std::error_code const&)> body_callback_function_type;

typedef std::function<bool(string_type&)> body_generator_function_type;

async_client(bool cache_resolved, bool follow_redirect,
bool always_verify_peer, int timeout,
std::shared_ptr<boost::asio::io_service> service,
std::shared_ptr<asio::io_service> service,
optional<string_type> certificate_filename,
optional<string_type> verify_path,
optional<string_type> certificate_file,
Expand All@@ -47,10 +47,10 @@ struct async_client
: connection_base(cache_resolved, follow_redirect, timeout),
service_ptr(service.get()
? service
: std::make_shared<boost::asio::io_service>()),
: std::make_shared<asio::io_service>()),
service_(*service_ptr),
resolver_(service_),
sentinel_(newboost::asio::io_service::work(service_)),
sentinel_(new asio::io_service::work(service_)),
certificate_filename_(std::move(certificate_filename)),
verify_path_(std::move(verify_path)),
certificate_file_(std::move(certificate_file)),
Expand All@@ -59,7 +59,7 @@ struct async_client
ssl_options_(ssl_options),
always_verify_peer_(always_verify_peer) {
connection_base::resolver_strand_.reset(
newboost::asio::io_service::strand(service_));
new asio::io_service::strand(service_));
if (!service)
lifetime_thread_.reset(new std::thread([this] () { service_.run(); }));
}
Expand DownExpand Up@@ -87,10 +87,10 @@ struct async_client
generator);
}

std::shared_ptr<boost::asio::io_service> service_ptr;
boost::asio::io_service& service_;
std::shared_ptr<asio::io_service> service_ptr;
asio::io_service& service_;
resolver_type resolver_;
std::shared_ptr<boost::asio::io_service::work> sentinel_;
std::shared_ptr<asio::io_service::work> sentinel_;
std::shared_ptr<std::thread> lifetime_thread_;
optional<string_type> certificate_filename_;
optional<string_type> verify_path_;
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,7 @@ struct async_connection_base {
typedef basic_request<Tag> request;
typedef basic_response<Tag> response;
typedef iterator_range<charconst *> char_const_range;
typedef std::function<void(char_const_rangeconst &,system::error_codeconst &)>
typedef std::function<void(char_const_rangeconst &,std::error_codeconst &)>
body_callback_function_type;
typedef std::function<bool(string_type &)> body_generator_function_type;
typedef std::shared_ptr<this_type> connection_ptr;
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp