Commit f451efa1 authored by Joseph Noir's avatar Joseph Noir

Clean up code, remove warnings

parent f53746ae
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
#ifndef CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP #ifndef CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP
#define CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP #define CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP
CAF_PUSH_WARNINGS
#include "boost/asio.hpp" #include "boost/asio.hpp"
CAF_POP_WARNINGS
#include "caf/detail/logging.hpp" #include "caf/detail/logging.hpp"
...@@ -55,22 +57,6 @@ using default_socket_acceptor = boost::asio::ip::tcp::acceptor; ...@@ -55,22 +57,6 @@ using default_socket_acceptor = boost::asio::ip::tcp::acceptor;
*/ */
using native_socket = typename default_socket::native_handle_type; using native_socket = typename default_socket::native_handle_type;
/**
* Platform-specific native acceptor socket type.
*/
using native_socket_acceptor
= typename default_socket_acceptor::native_handle_type;
/**
* A wrapper for the supervisor backend provided by boost::asio.
*/
struct asio_supervisor : public multiplexer::supervisor {
asio_supervisor(io_backend& iob) : work(iob) {}
private:
boost::asio::io_service::work work;
};
/** /**
* A wrapper for the boost::asio multiplexer * A wrapper for the boost::asio multiplexer
*/ */
......
...@@ -29,6 +29,22 @@ namespace caf { ...@@ -29,6 +29,22 @@ namespace caf {
namespace io { namespace io {
namespace network { namespace network {
namespace {
/**
* A wrapper for the supervisor backend provided by boost::asio.
*/
struct asio_supervisor : public multiplexer::supervisor {
asio_supervisor(io_backend& iob) : work(iob) {
// nop
}
private:
boost::asio::io_service::work work;
};
} // namespace anonymous
default_socket new_tcp_connection(io_backend& backend, const std::string& host, default_socket new_tcp_connection(io_backend& backend, const std::string& host,
uint16_t port) { uint16_t port) {
default_socket fd{backend}; default_socket fd{backend};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment