aboutsummaryrefslogtreecommitdiff
path: root/libcmix-network
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2017-02-11 14:48:52 +0100
committerDennis Brentjes <d.brentjes@gmail.com>2017-02-11 17:54:40 +0100
commit623dffe2c054d1639dbf9c8f21ddfb088c7950fb (patch)
treef8159c5b3cf9872f9b271d03ad5a4b65ecec19b8 /libcmix-network
parentb229dc91d8825689c5e66264b462ce01398e621e (diff)
downloadcmix-623dffe2c054d1639dbf9c8f21ddfb088c7950fb.tar.gz
cmix-623dffe2c054d1639dbf9c8f21ddfb088c7950fb.tar.bz2
cmix-623dffe2c054d1639dbf9c8f21ddfb088c7950fb.zip
Working Ed25519 Implementation of libcmix.
Diffstat (limited to 'libcmix-network')
-rw-r--r--libcmix-network/accept.cpp6
-rw-r--r--libcmix-network/client.hpp4
-rw-r--r--libcmix-network/connect.cpp8
-rw-r--r--libcmix-network/server.cpp3
-rw-r--r--libcmix-network/server.hpp1
5 files changed, 10 insertions, 12 deletions
diff --git a/libcmix-network/accept.cpp b/libcmix-network/accept.cpp
index 1ec26fe..9806a67 100644
--- a/libcmix-network/accept.cpp
+++ b/libcmix-network/accept.cpp
@@ -36,12 +36,12 @@ void accept_connection(tcp::acceptor& acceptor, std::shared_ptr<ssl::context> ct
{
if(!bool(ec))
{
- socket->async_handshake(boost::asio::ssl::stream_base::server, [&acceptor, ctx, socket, f](boost::system::error_code const& ec) {
- if(!bool(ec)) {
+ socket->async_handshake(boost::asio::ssl::stream_base::server, [&acceptor, ctx, socket, f](boost::system::error_code const& ec2) {
+ if(!bool(ec2)) {
f(std::unique_ptr<ssl::stream<tcp::socket>>(socket), ctx);
} else {
std::stringstream ss;
- ss << ec.message();
+ ss << ec2.message();
delete socket;
throw std::runtime_error(ss.str());
}
diff --git a/libcmix-network/client.hpp b/libcmix-network/client.hpp
index 7b2b16f..ff32d2e 100644
--- a/libcmix-network/client.hpp
+++ b/libcmix-network/client.hpp
@@ -74,8 +74,8 @@ class BaseClient {
boost::asio::async_read(
*socket,
receive_buffer->prepare(size),
- [this, message_handler](boost::system::error_code const& ec, size_t read_bytes) {
- handle_receive_message(message_handler, ec, read_bytes);
+ [this, message_handler](boost::system::error_code const& ec2, size_t read_bytes2) {
+ handle_receive_message(message_handler, ec2, read_bytes2);
}
);
} else {
diff --git a/libcmix-network/connect.cpp b/libcmix-network/connect.cpp
index e80a6d4..4bebf9d 100644
--- a/libcmix-network/connect.cpp
+++ b/libcmix-network/connect.cpp
@@ -70,11 +70,11 @@ void async_connect_iteration(basic_socket<tcp, stream_socket_service<tcp>>& sock
info->retry_timer.expires_from_now(boost::posix_time::seconds(seconds_to_wait));
- info->retry_timer.async_wait([&socket, info, on_connect](boost::system::error_code const& ec){
- if(ec == boost::system::errc::operation_canceled) {
+ info->retry_timer.async_wait([&socket, info, on_connect](boost::system::error_code const& ec2){
+ if(ec2 == boost::system::errc::operation_canceled) {
return;
- } else if(ec) {
- BOOST_LOG_TRIVIAL(error) << "Something went wrong with the retry timer: " << ec.message();
+ } else if(ec2) {
+ BOOST_LOG_TRIVIAL(error) << "Something went wrong with the retry timer: " << ec2.message();
} else {
async_connect_iteration(socket, info, on_connect);
}
diff --git a/libcmix-network/server.cpp b/libcmix-network/server.cpp
index a931c1e..e254d5d 100644
--- a/libcmix-network/server.cpp
+++ b/libcmix-network/server.cpp
@@ -4,8 +4,7 @@ using namespace boost::asio::ip;
using namespace boost::asio;
Server::Server(io_service& io_service, const ListenSettings& listen_settings)
-: listen_settings(listen_settings)
-, v4_acceptor(io_service, address_v4::from_string(listen_settings.ipv4_inaddr), listen_settings.port)
+: v4_acceptor(io_service, address_v4::from_string(listen_settings.ipv4_inaddr), listen_settings.port)
, v6_acceptor(io_service, address_v6::from_string(listen_settings.ipv6_inaddr), listen_settings.port)
{
/*
diff --git a/libcmix-network/server.hpp b/libcmix-network/server.hpp
index 29559e7..878bb0b 100644
--- a/libcmix-network/server.hpp
+++ b/libcmix-network/server.hpp
@@ -31,7 +31,6 @@ class Server
{
Server(boost::asio::io_service& io_service, ListenSettings const& listen_settings);
- ListenSettings const& listen_settings;
Acceptor v4_acceptor;
Acceptor v6_acceptor;