Commit 2185903c authored by Jakob Otto's avatar Jakob Otto

Refactor nested to concatenated namespaces

parent ab940731
...@@ -11,6 +11,17 @@ using std::find_if; ...@@ -11,6 +11,17 @@ using std::find_if;
using std::string; using std::string;
using std::vector; using std::vector;
void split(const string& str, const string& separator, vector<string>& dest) {
size_t current, previous = 0;
current = str.find(separator);
while (current != std::string::npos) {
dest.emplace_back(str.substr(previous, current - previous));
previous = current + separator.size();
current = str.find(separator, previous);
}
dest.push_back(str.substr(previous, current - previous));
}
void trim(string& str) { void trim(string& str) {
auto not_space = [](char c) { return isspace(c) == 0; }; auto not_space = [](char c) { return isspace(c) == 0; };
str.erase(str.begin(), find_if(str.begin(), str.end(), not_space)); str.erase(str.begin(), find_if(str.begin(), str.end(), not_space));
...@@ -71,7 +82,7 @@ int main(int argc, char** argv) { ...@@ -71,7 +82,7 @@ int main(int argc, char** argv) {
line.pop_back(); line.pop_back();
line.erase(line.begin(), find(line.begin(), line.end(), ' ')); line.erase(line.begin(), find(line.begin(), line.end(), ' '));
trim(line); trim(line);
namespaces.emplace_back(line); split(line, "::", namespaces);
} }
} }
// Sanity checking. // Sanity checking.
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
#include "caf/stateful_actor.hpp" #include "caf/stateful_actor.hpp"
#include "caf/unit.hpp" #include "caf/unit.hpp"
namespace caf { namespace caf::bb {
namespace bb {
/// @relates container_source /// @relates container_source
template <class Container> template <class Container>
...@@ -98,5 +97,4 @@ behavior container_source(container_source_type<Container>* self, Container xs, ...@@ -98,5 +97,4 @@ behavior container_source(container_source_type<Container>* self, Container xs,
/// Convenience function for spawning container sources. /// Convenience function for spawning container sources.
} // namespace bb
} // namespace caf } // namespace caf
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include "caf/string_algorithms.hpp" #include "caf/string_algorithms.hpp"
#include "caf/unit.hpp" #include "caf/unit.hpp"
namespace caf { namespace caf::bb {
namespace bb {
/// @relates stream_reader /// @relates stream_reader
template <class InputStream> template <class InputStream>
...@@ -99,5 +98,4 @@ void stream_reader(stream_source_type<InputStream>* self, ...@@ -99,5 +98,4 @@ void stream_reader(stream_source_type<InputStream>* self,
unit(src.ptr()->add_outbound_path(sinks)...); unit(src.ptr()->add_outbound_path(sinks)...);
} }
} // namespace bb
} // namespace caf } // namespace caf
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
#include "caf/string_algorithms.hpp" #include "caf/string_algorithms.hpp"
#include "caf/unit.hpp" #include "caf/unit.hpp"
namespace caf { namespace caf::policy {
namespace policy {
/// Parses whitespace-separated integers from input strings to 'ValueType' and /// Parses whitespace-separated integers from input strings to 'ValueType' and
/// pushes generated integers to a downstream. /// pushes generated integers to a downstream.
...@@ -72,5 +71,4 @@ public: ...@@ -72,5 +71,4 @@ public:
} }
}; };
} // namespace policy
} // namespace caf } // namespace caf
...@@ -21,12 +21,10 @@ ...@@ -21,12 +21,10 @@
#include "caf/detail/socket_sys_includes.hpp" #include "caf/detail/socket_sys_includes.hpp"
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
namespace caf { namespace caf::detail {
namespace detail {
void convert(const ip_endpoint& src, sockaddr_storage& dst); void convert(const ip_endpoint& src, sockaddr_storage& dst);
error convert(const sockaddr_storage& src, ip_endpoint& dst); error convert(const sockaddr_storage& src, ip_endpoint& dst);
} // namespace detail
} // namespace caf } // namespace caf
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
#include "caf/detail/socket_sys_includes.hpp" #include "caf/detail/socket_sys_includes.hpp"
namespace caf { namespace caf::detail {
namespace detail {
inline auto addr_of(sockaddr_in& what) -> decltype(what.sin_addr)& { inline auto addr_of(sockaddr_in& what) -> decltype(what.sin_addr)& {
return what.sin_addr; return what.sin_addr;
...@@ -47,5 +46,4 @@ inline auto port_of(sockaddr_in6& what) -> decltype(what.sin6_port)& { ...@@ -47,5 +46,4 @@ inline auto port_of(sockaddr_in6& what) -> decltype(what.sin6_port)& {
return what.sin6_port; return what.sin6_port;
} }
} // namespace detail
} // namespace caf } // namespace caf
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
#include "caf/config.hpp" #include "caf/config.hpp"
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -41,5 +40,4 @@ using socket_size_type = unsigned; ...@@ -41,5 +40,4 @@ using socket_size_type = unsigned;
#endif // CAF_WINDOWS #endif // CAF_WINDOWS
} // namespace net
} // namespace caf } // namespace caf
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "caf/actor_proxy.hpp" #include "caf/actor_proxy.hpp"
#include "caf/net/endpoint_manager.hpp" #include "caf/net/endpoint_manager.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Implements a simple proxy forwarding all operations to a manager. /// Implements a simple proxy forwarding all operations to a manager.
class actor_proxy_impl : public actor_proxy { class actor_proxy_impl : public actor_proxy {
...@@ -42,5 +41,4 @@ private: ...@@ -42,5 +41,4 @@ private:
endpoint_manager_ptr dst_; endpoint_manager_ptr dst_;
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
#include "caf/net/stream_socket.hpp" #include "caf/net/stream_socket.hpp"
#include "caf/node_id.hpp" #include "caf/node_id.hpp"
namespace caf { namespace caf::net::backend {
namespace net {
namespace backend {
/// Minimal backend for unit testing. /// Minimal backend for unit testing.
/// @warning this backend is *not* thread safe. /// @warning this backend is *not* thread safe.
...@@ -75,6 +73,4 @@ private: ...@@ -75,6 +73,4 @@ private:
proxy_registry proxies_; proxy_registry proxies_;
}; };
} // namespace backend
} // namespace net
} // namespace caf } // namespace caf
...@@ -50,9 +50,7 @@ ...@@ -50,9 +50,7 @@
#include "caf/span.hpp" #include "caf/span.hpp"
#include "caf/unit.hpp" #include "caf/unit.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// An implementation of BASP as an application layer protocol. /// An implementation of BASP as an application layer protocol.
class application { class application {
...@@ -211,6 +209,4 @@ private: ...@@ -211,6 +209,4 @@ private:
std::unique_ptr<hub_type> hub_; std::unique_ptr<hub_type> hub_;
}; };
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
#include <string> #include <string>
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// @addtogroup BASP /// @addtogroup BASP
...@@ -48,6 +46,4 @@ std::string to_string(connection_state x); ...@@ -48,6 +46,4 @@ std::string to_string(connection_state x);
/// @} /// @}
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// @addtogroup BASP /// @addtogroup BASP
...@@ -36,6 +34,4 @@ constexpr size_t header_size = 13; ...@@ -36,6 +34,4 @@ constexpr size_t header_size = 13;
/// @} /// @}
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// BASP-specific error codes. /// BASP-specific error codes.
enum class ec : uint8_t { enum class ec : uint8_t {
...@@ -51,6 +49,4 @@ std::string to_string(ec x); ...@@ -51,6 +49,4 @@ std::string to_string(ec x);
/// @relates ec /// @relates ec
error make_error(ec x); error make_error(ec x);
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -28,9 +28,7 @@ ...@@ -28,9 +28,7 @@
#include "caf/net/basp/constants.hpp" #include "caf/net/basp/constants.hpp"
#include "caf/net/basp/message_type.hpp" #include "caf/net/basp/message_type.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// @addtogroup BASP /// @addtogroup BASP
...@@ -91,6 +89,4 @@ typename Inspector::result_type inspect(Inspector& f, header& x) { ...@@ -91,6 +89,4 @@ typename Inspector::result_type inspect(Inspector& f, header& x) {
/// @} /// @}
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
#include "caf/mailbox_element.hpp" #include "caf/mailbox_element.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// Enforces strict order of message delivery, i.e., deliver messages in the /// Enforces strict order of message delivery, i.e., deliver messages in the
/// same order as if they were deserialized by a single thread. /// same order as if they were deserialized by a single thread.
...@@ -76,6 +74,4 @@ public: ...@@ -76,6 +74,4 @@ public:
std::vector<actor_msg> pending; std::vector<actor_msg> pending;
}; };
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// @addtogroup BASP /// @addtogroup BASP
...@@ -75,6 +73,4 @@ std::string to_string(message_type); ...@@ -75,6 +73,4 @@ std::string to_string(message_type);
/// @} /// @}
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -33,9 +33,7 @@ ...@@ -33,9 +33,7 @@
#include "caf/net/basp/header.hpp" #include "caf/net/basp/header.hpp"
#include "caf/node_id.hpp" #include "caf/node_id.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
template <class Subtype> template <class Subtype>
class remote_message_handler { class remote_message_handler {
...@@ -80,6 +78,4 @@ public: ...@@ -80,6 +78,4 @@ public:
} }
}; };
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -32,9 +32,7 @@ ...@@ -32,9 +32,7 @@
#include "caf/node_id.hpp" #include "caf/node_id.hpp"
#include "caf/resumable.hpp" #include "caf/resumable.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
/// Deserializes payloads for BASP messages asynchronously. /// Deserializes payloads for BASP messages asynchronously.
class worker : public detail::abstract_worker, class worker : public detail::abstract_worker,
...@@ -113,6 +111,4 @@ private: ...@@ -113,6 +111,4 @@ private:
buffer_type payload_; buffer_type payload_;
}; };
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "caf/net/network_socket.hpp" #include "caf/net/network_socket.hpp"
#include "caf/variant.hpp" #include "caf/variant.hpp"
namespace caf { namespace caf::net {
namespace net {
/// A datagram-oriented network communication endpoint. /// A datagram-oriented network communication endpoint.
struct datagram_socket : network_socket { struct datagram_socket : network_socket {
...@@ -41,5 +40,4 @@ error allow_connreset(datagram_socket x, bool new_value); ...@@ -41,5 +40,4 @@ error allow_connreset(datagram_socket x, bool new_value);
variant<size_t, sec> variant<size_t, sec>
check_datagram_socket_io_res(std::make_signed<size_t>::type res); check_datagram_socket_io_res(std::make_signed<size_t>::type res);
} // namespace net
} // namespace caf } // namespace caf
...@@ -22,10 +22,7 @@ ...@@ -22,10 +22,7 @@
// -- hard-coded default values for various CAF options ------------------------ // -- hard-coded default values for various CAF options ------------------------
namespace caf { namespace caf::defaults::middleman {
namespace defaults {
namespace middleman {
/// Maximum number of cached buffers for sending payloads. /// Maximum number of cached buffers for sending payloads.
extern const size_t max_payload_buffers; extern const size_t max_payload_buffers;
...@@ -33,7 +30,4 @@ extern const size_t max_payload_buffers; ...@@ -33,7 +30,4 @@ extern const size_t max_payload_buffers;
/// Maximum number of cached buffers for sending headers. /// Maximum number of cached buffers for sending headers.
extern const size_t max_header_buffers; extern const size_t max_header_buffers;
} // namespace middleman
} // namespace defaults
} // namespace caf } // namespace caf
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
#include "caf/net/socket_manager.hpp" #include "caf/net/socket_manager.hpp"
#include "caf/variant.hpp" #include "caf/variant.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Manages a communication endpoint. /// Manages a communication endpoint.
class endpoint_manager : public socket_manager { class endpoint_manager : public socket_manager {
...@@ -104,5 +103,4 @@ protected: ...@@ -104,5 +103,4 @@ protected:
using endpoint_manager_ptr = intrusive_ptr<endpoint_manager>; using endpoint_manager_ptr = intrusive_ptr<endpoint_manager>;
} // namespace net
} // namespace caf } // namespace caf
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include "caf/detail/overload.hpp" #include "caf/detail/overload.hpp"
#include "caf/net/endpoint_manager.hpp" #include "caf/net/endpoint_manager.hpp"
namespace caf { namespace caf::net {
namespace net {
template <class Transport> template <class Transport>
class endpoint_manager_impl : public endpoint_manager { class endpoint_manager_impl : public endpoint_manager {
...@@ -132,5 +131,4 @@ private: ...@@ -132,5 +131,4 @@ private:
uint64_t next_timeout_id_; uint64_t next_timeout_id_;
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
#include "caf/unit.hpp" #include "caf/unit.hpp"
#include "caf/variant.hpp" #include "caf/variant.hpp"
namespace caf { namespace caf::net {
namespace net {
class endpoint_manager_queue { class endpoint_manager_queue {
public: public:
...@@ -201,5 +200,4 @@ public: ...@@ -201,5 +200,4 @@ public:
using type = intrusive::fifo_inbox<policy>; using type = intrusive::fifo_inbox<policy>;
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
namespace caf { namespace caf::net {
namespace net {
struct this_host { struct this_host {
/// Initializes the network subsystem. /// Initializes the network subsystem.
...@@ -31,5 +30,4 @@ struct this_host { ...@@ -31,5 +30,4 @@ struct this_host {
static void cleanup(); static void cleanup();
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
namespace caf { namespace caf::net::ip {
namespace net {
namespace ip {
/// Returns all IP addresses of `host` (if any). /// Returns all IP addresses of `host` (if any).
std::vector<ip_address> resolve(string_view host); std::vector<ip_address> resolve(string_view host);
...@@ -43,6 +41,4 @@ std::vector<ip_address> local_addresses(ip_address host); ...@@ -43,6 +41,4 @@ std::vector<ip_address> local_addresses(ip_address host);
/// Returns the hostname of this device. /// Returns the hostname of this device.
std::string hostname(); std::string hostname();
} // namespace ip
} // namespace net
} // namespace caf } // namespace caf
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
#include "caf/net/endpoint_manager.hpp" #include "caf/net/endpoint_manager.hpp"
#include "caf/net/endpoint_manager_impl.hpp" #include "caf/net/endpoint_manager_impl.hpp"
namespace caf { namespace caf::net {
namespace net {
template <class Transport> template <class Transport>
endpoint_manager_ptr make_endpoint_manager(const multiplexer_ptr& mpx, endpoint_manager_ptr make_endpoint_manager(const multiplexer_ptr& mpx,
...@@ -32,5 +31,4 @@ endpoint_manager_ptr make_endpoint_manager(const multiplexer_ptr& mpx, ...@@ -32,5 +31,4 @@ endpoint_manager_ptr make_endpoint_manager(const multiplexer_ptr& mpx,
return make_counted<impl>(mpx, sys, std::move(trans)); return make_counted<impl>(mpx, sys, std::move(trans));
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
#include "caf/net/fwd.hpp" #include "caf/net/fwd.hpp"
namespace caf { namespace caf::net {
namespace net {
class middleman : public actor_system::module { class middleman : public actor_system::module {
public: public:
...@@ -119,5 +118,4 @@ private: ...@@ -119,5 +118,4 @@ private:
std::thread mpx_thread_; std::thread mpx_thread_;
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include "caf/net/fwd.hpp" #include "caf/net/fwd.hpp"
#include "caf/proxy_registry.hpp" #include "caf/proxy_registry.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Technology-specific backend for connecting to and managing peer /// Technology-specific backend for connecting to and managing peer
/// connections. /// connections.
...@@ -63,5 +62,4 @@ private: ...@@ -63,5 +62,4 @@ private:
/// @relates middleman_backend /// @relates middleman_backend
using middleman_backend_ptr = std::unique_ptr<middleman_backend>; using middleman_backend_ptr = std::unique_ptr<middleman_backend>;
} // namespace net
} // namespace caf } // namespace caf
...@@ -34,8 +34,7 @@ struct pollfd; ...@@ -34,8 +34,7 @@ struct pollfd;
} // extern "C" } // extern "C"
namespace caf { namespace caf::net {
namespace net {
/// Multiplexes any number of ::socket_manager objects with a ::socket. /// Multiplexes any number of ::socket_manager objects with a ::socket.
class multiplexer : public std::enable_shared_from_this<multiplexer> { class multiplexer : public std::enable_shared_from_this<multiplexer> {
...@@ -128,5 +127,4 @@ using multiplexer_ptr = std::shared_ptr<multiplexer>; ...@@ -128,5 +127,4 @@ using multiplexer_ptr = std::shared_ptr<multiplexer>;
/// @relates multiplexer /// @relates multiplexer
using weak_multiplexer_ptr = std::weak_ptr<multiplexer>; using weak_multiplexer_ptr = std::weak_ptr<multiplexer>;
} // namespace net
} // namespace caf } // namespace caf
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
#include "caf/net/socket.hpp" #include "caf/net/socket.hpp"
#include "caf/net/socket_id.hpp" #include "caf/net/socket_id.hpp"
namespace caf { namespace caf::net {
namespace net {
/// A bidirectional network communication endpoint. /// A bidirectional network communication endpoint.
struct network_socket : socket { struct network_socket : socket {
...@@ -83,5 +82,4 @@ void shutdown_write(network_socket x); ...@@ -83,5 +82,4 @@ void shutdown_write(network_socket x);
/// @relates network_socket /// @relates network_socket
void shutdown(network_socket x); void shutdown(network_socket x);
} // namespace net
} // namespace caf } // namespace caf
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
#include <string> #include <string>
namespace caf { namespace caf::net {
namespace net {
/// Values for representing bitmask of I/O operations. /// Values for representing bitmask of I/O operations.
enum class operation { enum class operation {
...@@ -49,5 +48,4 @@ constexpr operation operator~(operation x) { ...@@ -49,5 +48,4 @@ constexpr operation operator~(operation x) {
std::string to_string(operation x); std::string to_string(operation x);
} // namespace net
} // namespace caf } // namespace caf
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include "caf/net/fwd.hpp" #include "caf/net/fwd.hpp"
#include "caf/span.hpp" #include "caf/span.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Implements an interface for packet writing in application-layers. /// Implements an interface for packet writing in application-layers.
class packet_writer { class packet_writer {
...@@ -56,5 +55,4 @@ protected: ...@@ -56,5 +55,4 @@ protected:
virtual void write_impl(span<buffer_type*> buffers) = 0; virtual void write_impl(span<buffer_type*> buffers) = 0;
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "caf/byte.hpp" #include "caf/byte.hpp"
#include "caf/span.hpp" #include "caf/span.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Implements the interface for transport and application policies and /// Implements the interface for transport and application policies and
/// dispatches member functions either to `object` or `parent`. /// dispatches member functions either to `object` or `parent`.
...@@ -93,5 +92,4 @@ make_packet_writer_decorator(Object& object, Parent& parent) { ...@@ -93,5 +92,4 @@ make_packet_writer_decorator(Object& object, Parent& parent) {
return {object, parent}; return {object, parent};
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
#include "caf/net/socket.hpp" #include "caf/net/socket.hpp"
#include "caf/net/socket_id.hpp" #include "caf/net/socket_id.hpp"
namespace caf { namespace caf::net {
namespace net {
/// A unidirectional communication endpoint for inter-process communication. /// A unidirectional communication endpoint for inter-process communication.
struct pipe_socket : socket { struct pipe_socket : socket {
...@@ -63,5 +62,4 @@ variant<size_t, sec> read(pipe_socket x, span<byte>); ...@@ -63,5 +62,4 @@ variant<size_t, sec> read(pipe_socket x, span<byte>);
variant<size_t, sec> variant<size_t, sec>
check_pipe_socket_io_res(std::make_signed<size_t>::type res); check_pipe_socket_io_res(std::make_signed<size_t>::type res);
} // namespace net
} // namespace caf } // namespace caf
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
#include "caf/net/pipe_socket.hpp" #include "caf/net/pipe_socket.hpp"
#include "caf/net/socket_manager.hpp" #include "caf/net/socket_manager.hpp"
namespace caf { namespace caf::net {
namespace net {
class pollset_updater : public socket_manager { class pollset_updater : public socket_manager {
public: public:
...@@ -63,5 +62,4 @@ private: ...@@ -63,5 +62,4 @@ private:
size_t buf_size_; size_t buf_size_;
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include "caf/config.hpp" #include "caf/config.hpp"
namespace caf { namespace caf::net {
namespace net {
enum class receive_policy_flag : unsigned { at_least, at_most, exactly }; enum class receive_policy_flag : unsigned { at_least, at_most, exactly };
...@@ -57,5 +56,4 @@ public: ...@@ -57,5 +56,4 @@ public:
} }
}; };
} // namespace net
} // namespace caf } // namespace caf
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
#include "caf/net/socket_id.hpp" #include "caf/net/socket_id.hpp"
namespace caf { namespace caf::net {
namespace net {
/// An internal endpoint for sending or receiving data. Can be either a /// An internal endpoint for sending or receiving data. Can be either a
/// ::network_socket, ::pipe_socket, ::stream_socket, or ::datagram_socket. /// ::network_socket, ::pipe_socket, ::stream_socket, or ::datagram_socket.
...@@ -89,5 +88,4 @@ error child_process_inherit(socket x, bool new_value); ...@@ -89,5 +88,4 @@ error child_process_inherit(socket x, bool new_value);
/// @relates socket /// @relates socket
error nonblocking(socket x, bool new_value); error nonblocking(socket x, bool new_value);
} // namespace net
} // namespace caf } // namespace caf
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
#include "caf/net/socket_id.hpp" #include "caf/net/socket_id.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Closes the guarded socket when destroyed. /// Closes the guarded socket when destroyed.
template <class Socket> template <class Socket>
...@@ -78,5 +77,4 @@ socket_guard<Socket> make_socket_guard(Socket sock) { ...@@ -78,5 +77,4 @@ socket_guard<Socket> make_socket_guard(Socket sock) {
return socket_guard<Socket>{sock}; return socket_guard<Socket>{sock};
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include "caf/config.hpp" #include "caf/config.hpp"
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -51,5 +50,4 @@ constexpr socket_id invalid_socket_id = -1; ...@@ -51,5 +50,4 @@ constexpr socket_id invalid_socket_id = -1;
/// @relates socket /// @relates socket
using signed_socket_id = std::make_signed<socket_id>::type; using signed_socket_id = std::make_signed<socket_id>::type;
} // namespace net
} // namespace caf } // namespace caf
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include "caf/net/socket.hpp" #include "caf/net/socket.hpp"
#include "caf/ref_counted.hpp" #include "caf/ref_counted.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Manages the lifetime of a single socket and handles any I/O events on it. /// Manages the lifetime of a single socket and handles any I/O events on it.
class socket_manager : public ref_counted { class socket_manager : public ref_counted {
...@@ -95,5 +94,4 @@ protected: ...@@ -95,5 +94,4 @@ protected:
using socket_manager_ptr = intrusive_ptr<socket_manager>; using socket_manager_ptr = intrusive_ptr<socket_manager>;
} // namespace net
} // namespace caf } // namespace caf
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
#include "caf/net/network_socket.hpp" #include "caf/net/network_socket.hpp"
namespace caf { namespace caf::net {
namespace net {
/// A connection-oriented network communication endpoint for bidirectional byte /// A connection-oriented network communication endpoint for bidirectional byte
/// streams. /// streams.
...@@ -78,5 +77,4 @@ variant<size_t, sec> write(stream_socket x, ...@@ -78,5 +77,4 @@ variant<size_t, sec> write(stream_socket x,
variant<size_t, sec> variant<size_t, sec>
check_stream_socket_io_res(std::make_signed<size_t>::type res); check_stream_socket_io_res(std::make_signed<size_t>::type res);
} // namespace net
} // namespace caf } // namespace caf
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "caf/net/network_socket.hpp" #include "caf/net/network_socket.hpp"
#include "caf/uri.hpp" #include "caf/uri.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Represents a TCP acceptor in listening mode. /// Represents a TCP acceptor in listening mode.
struct tcp_accept_socket : network_socket { struct tcp_accept_socket : network_socket {
...@@ -58,5 +57,4 @@ make_tcp_accept_socket(const uri::authority_type& node, ...@@ -58,5 +57,4 @@ make_tcp_accept_socket(const uri::authority_type& node,
/// @relates tcp_accept_socket /// @relates tcp_accept_socket
expected<tcp_stream_socket> accept(tcp_accept_socket x); expected<tcp_stream_socket> accept(tcp_accept_socket x);
} // namespace net
} // namespace caf } // namespace caf
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "caf/net/stream_socket.hpp" #include "caf/net/stream_socket.hpp"
#include "caf/uri.hpp" #include "caf/uri.hpp"
namespace caf { namespace caf::net {
namespace net {
/// Represents a TCP connection. /// Represents a TCP connection.
struct tcp_stream_socket : stream_socket { struct tcp_stream_socket : stream_socket {
...@@ -46,5 +45,4 @@ expected<tcp_stream_socket> make_connected_tcp_stream_socket(ip_endpoint node); ...@@ -46,5 +45,4 @@ expected<tcp_stream_socket> make_connected_tcp_stream_socket(ip_endpoint node);
expected<tcp_stream_socket> expected<tcp_stream_socket>
make_connected_tcp_stream_socket(const uri::authority_type& node); make_connected_tcp_stream_socket(const uri::authority_type& node);
} // namespace net
} // namespace caf } // namespace caf
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
#include "caf/net/network_socket.hpp" #include "caf/net/network_socket.hpp"
namespace caf { namespace caf::net {
namespace net {
/// A datagram-oriented network communication endpoint for bidirectional /// A datagram-oriented network communication endpoint for bidirectional
/// byte transmission. /// byte transmission.
...@@ -83,5 +82,4 @@ variant<size_t, sec> write(udp_datagram_socket x, span<const byte> buf, ...@@ -83,5 +82,4 @@ variant<size_t, sec> write(udp_datagram_socket x, span<const byte> buf,
variant<size_t, sec> variant<size_t, sec>
check_udp_datagram_socket_io_res(std::make_signed<size_t>::type res); check_udp_datagram_socket_io_res(std::make_signed<size_t>::type res);
} // namespace net
} // namespace caf } // namespace caf
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
#include "caf/expected.hpp" #include "caf/expected.hpp"
#include "caf/logger.hpp" #include "caf/logger.hpp"
namespace caf { namespace caf::net {
namespace net {
actor_proxy_impl::actor_proxy_impl(actor_config& cfg, endpoint_manager_ptr dst) actor_proxy_impl::actor_proxy_impl(actor_config& cfg, endpoint_manager_ptr dst)
: super(cfg), sf_(dst->serialize_fun()), dst_(std::move(dst)) { : super(cfg), sf_(dst->serialize_fun()), dst_(std::move(dst)) {
...@@ -50,5 +49,4 @@ void actor_proxy_impl::kill_proxy(execution_unit* ctx, error rsn) { ...@@ -50,5 +49,4 @@ void actor_proxy_impl::kill_proxy(execution_unit* ctx, error rsn) {
cleanup(std::move(rsn), ctx); cleanup(std::move(rsn), ctx);
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -41,9 +41,7 @@ ...@@ -41,9 +41,7 @@
#include "caf/string_algorithms.hpp" #include "caf/string_algorithms.hpp"
#include "caf/type_erased_tuple.hpp" #include "caf/type_erased_tuple.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
application::application(proxy_registry& proxies) application::application(proxy_registry& proxies)
: proxies_(proxies), queue_{new message_queue}, hub_{new hub_type} { : proxies_(proxies), queue_{new message_queue}, hub_{new hub_type} {
...@@ -397,6 +395,4 @@ error application::generate_handshake(std::vector<byte>& buf) { ...@@ -397,6 +395,4 @@ error application::generate_handshake(std::vector<byte>& buf) {
defaults::middleman::app_identifiers)); defaults::middleman::app_identifiers));
} }
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "caf/ipv6_endpoint.hpp" #include "caf/ipv6_endpoint.hpp"
#include "caf/sec.hpp" #include "caf/sec.hpp"
namespace caf { namespace caf::detail {
namespace detail {
void convert(const ip_endpoint& src, sockaddr_storage& dst) { void convert(const ip_endpoint& src, sockaddr_storage& dst) {
memset(&dst, 0, sizeof(sockaddr_storage)); memset(&dst, 0, sizeof(sockaddr_storage));
...@@ -60,5 +59,4 @@ error convert(const sockaddr_storage& src, ip_endpoint& dst) { ...@@ -60,5 +59,4 @@ error convert(const sockaddr_storage& src, ip_endpoint& dst) {
return none; return none;
} }
} // namespace detail
} // namespace caf } // namespace caf
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
#include "caf/detail/socket_sys_includes.hpp" #include "caf/detail/socket_sys_includes.hpp"
#include "caf/logger.hpp" #include "caf/logger.hpp"
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -60,5 +59,4 @@ check_datagram_socket_io_res(std::make_signed<size_t>::type res) { ...@@ -60,5 +59,4 @@ check_datagram_socket_io_res(std::make_signed<size_t>::type res) {
return static_cast<size_t>(res); return static_cast<size_t>(res);
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -18,16 +18,10 @@ ...@@ -18,16 +18,10 @@
#include "caf/net/defaults.hpp" #include "caf/net/defaults.hpp"
namespace caf { namespace caf::defaults::middleman {
namespace defaults {
namespace middleman {
const size_t max_payload_buffers = 100; const size_t max_payload_buffers = 100;
const size_t max_header_buffers = 10; const size_t max_header_buffers = 10;
} // namespace middleman
} // namespace defaults
} // namespace caf } // namespace caf
...@@ -22,14 +22,10 @@ ...@@ -22,14 +22,10 @@
#include "caf/error.hpp" #include "caf/error.hpp"
#include "caf/string_view.hpp" #include "caf/string_view.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
error make_error(ec x) { error make_error(ec x) {
return {static_cast<uint8_t>(x), atom("basp")}; return {static_cast<uint8_t>(x), atom("basp")};
} }
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include "caf/sec.hpp" #include "caf/sec.hpp"
#include "caf/send.hpp" #include "caf/send.hpp"
namespace caf { namespace caf::net {
namespace net {
endpoint_manager::endpoint_manager(socket handle, const multiplexer_ptr& parent, endpoint_manager::endpoint_manager(socket handle, const multiplexer_ptr& parent,
actor_system& sys) actor_system& sys)
...@@ -87,5 +86,4 @@ bool endpoint_manager::enqueue(endpoint_manager_queue::element* ptr) { ...@@ -87,5 +86,4 @@ bool endpoint_manager::enqueue(endpoint_manager_queue::element* ptr) {
} }
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
#include "caf/detail/network_order.hpp" #include "caf/detail/network_order.hpp"
#include "caf/span.hpp" #include "caf/span.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
namespace { namespace {
...@@ -69,6 +67,4 @@ void to_bytes(header x, std::vector<byte>& buf) { ...@@ -69,6 +67,4 @@ void to_bytes(header x, std::vector<byte>& buf) {
to_bytes_impl(x, buf.data()); to_bytes_impl(x, buf.data());
} }
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include "caf/net/socket.hpp" #include "caf/net/socket.hpp"
#include "caf/none.hpp" #include "caf/none.hpp"
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -53,5 +52,4 @@ void this_host::cleanup() { ...@@ -53,5 +52,4 @@ void this_host::cleanup() {
#endif // CAF_WINDOWS #endif // CAF_WINDOWS
} // namespace net
} // namespace caf } // namespace caf
...@@ -54,9 +54,7 @@ using std::pair; ...@@ -54,9 +54,7 @@ using std::pair;
using std::string; using std::string;
using std::vector; using std::vector;
namespace caf { namespace caf::net::ip {
namespace net {
namespace ip {
namespace { namespace {
...@@ -251,6 +249,4 @@ std::string hostname() { ...@@ -251,6 +249,4 @@ std::string hostname() {
return buf; return buf;
} }
} // namespace ip
} // namespace net
} // namespace caf } // namespace caf
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
#include <iterator> #include <iterator>
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
message_queue::message_queue() : next_id(0), next_undelivered(0) { message_queue::message_queue() : next_id(0), next_undelivered(0) {
// nop // nop
...@@ -72,6 +70,4 @@ uint64_t message_queue::new_id() { ...@@ -72,6 +70,4 @@ uint64_t message_queue::new_id() {
return next_id++; return next_id++;
} }
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
...@@ -38,8 +38,7 @@ ...@@ -38,8 +38,7 @@
# include "caf/detail/socket_sys_includes.hpp" # include "caf/detail/socket_sys_includes.hpp"
#endif // CAF_WINDOWS #endif // CAF_WINDOWS
namespace caf { namespace caf::net {
namespace net {
#ifndef POLLRDHUP #ifndef POLLRDHUP
# define POLLRDHUP POLLHUP # define POLLRDHUP POLLHUP
...@@ -283,5 +282,4 @@ void multiplexer::write_to_pipe(uint8_t opcode, const socket_manager_ptr& mgr) { ...@@ -283,5 +282,4 @@ void multiplexer::write_to_pipe(uint8_t opcode, const socket_manager_ptr& mgr) {
mgr->deref(); mgr->deref();
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -29,9 +29,7 @@ ...@@ -29,9 +29,7 @@
#include "caf/raise_error.hpp" #include "caf/raise_error.hpp"
#include "caf/send.hpp" #include "caf/send.hpp"
namespace caf { namespace caf::net::backend {
namespace net {
namespace backend {
test::test(middleman& mm) test::test(middleman& mm)
: middleman_backend("test"), mm_(mm), proxies_(mm.system(), *this) { : middleman_backend("test"), mm_(mm), proxies_(mm.system(), *this) {
...@@ -101,6 +99,4 @@ test::peer_entry& test::get_peer(const node_id& id) { ...@@ -101,6 +99,4 @@ test::peer_entry& test::get_peer(const node_id& id) {
return emplace(id, sockets->first, sockets->second); return emplace(id, sockets->first, sockets->second);
} }
} // namespace backend
} // namespace net
} // namespace caf } // namespace caf
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
#include "caf/net/endpoint_manager_queue.hpp" #include "caf/net/endpoint_manager_queue.hpp"
namespace caf { namespace caf::net {
namespace net {
endpoint_manager_queue::element::~element() { endpoint_manager_queue::element::~element() {
// nop // nop
...@@ -74,5 +73,4 @@ endpoint_manager_queue::message::~message() { ...@@ -74,5 +73,4 @@ endpoint_manager_queue::message::~message() {
// nop // nop
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include "caf/send.hpp" #include "caf/send.hpp"
#include "caf/uri.hpp" #include "caf/uri.hpp"
namespace caf { namespace caf::net {
namespace net {
middleman::middleman(actor_system& sys) : sys_(sys) { middleman::middleman(actor_system& sys) : sys_(sys) {
mpx_ = std::make_shared<multiplexer>(); mpx_ = std::make_shared<multiplexer>();
...@@ -103,5 +102,4 @@ middleman_backend* middleman::backend(string_view scheme) const noexcept { ...@@ -103,5 +102,4 @@ middleman_backend* middleman::backend(string_view scheme) const noexcept {
return nullptr; return nullptr;
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
#include "caf/net/middleman_backend.hpp" #include "caf/net/middleman_backend.hpp"
namespace caf { namespace caf::net {
namespace net {
middleman_backend::middleman_backend(std::string id) : id_(std::move(id)) { middleman_backend::middleman_backend(std::string id) : id_(std::move(id)) {
// nop // nop
...@@ -29,5 +28,4 @@ middleman_backend::~middleman_backend() { ...@@ -29,5 +28,4 @@ middleman_backend::~middleman_backend() {
// nop // nop
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -18,12 +18,10 @@ ...@@ -18,12 +18,10 @@
#include "caf/net/packet_writer.hpp" #include "caf/net/packet_writer.hpp"
namespace caf { namespace caf::net {
namespace net {
packet_writer::~packet_writer() { packet_writer::~packet_writer() {
// nop // nop
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -55,8 +55,7 @@ uint16_t port_of(sockaddr& what) { ...@@ -55,8 +55,7 @@ uint16_t port_of(sockaddr& what) {
} // namespace } // namespace
namespace caf { namespace caf::net {
namespace net {
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD) #if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD)
# define CAF_HAS_NOSIGPIPE_SOCKET_FLAG # define CAF_HAS_NOSIGPIPE_SOCKET_FLAG
...@@ -193,5 +192,4 @@ void shutdown(network_socket x) { ...@@ -193,5 +192,4 @@ void shutdown(network_socket x) {
::shutdown(x.id, 2); ::shutdown(x.id, 2);
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
#include "caf/span.hpp" #include "caf/span.hpp"
#include "caf/variant.hpp" #include "caf/variant.hpp"
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -102,5 +101,4 @@ check_pipe_socket_io_res(std::make_signed<size_t>::type res) { ...@@ -102,5 +101,4 @@ check_pipe_socket_io_res(std::make_signed<size_t>::type res) {
return check_stream_socket_io_res(res); return check_stream_socket_io_res(res);
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "caf/span.hpp" #include "caf/span.hpp"
#include "caf/variant.hpp" #include "caf/variant.hpp"
namespace caf { namespace caf::net {
namespace net {
pollset_updater::pollset_updater(pipe_socket read_handle, pollset_updater::pollset_updater(pipe_socket read_handle,
const multiplexer_ptr& parent) const multiplexer_ptr& parent)
...@@ -72,5 +71,4 @@ void pollset_updater::handle_error(sec) { ...@@ -72,5 +71,4 @@ void pollset_updater::handle_error(sec) {
// nop // nop
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include "caf/sec.hpp" #include "caf/sec.hpp"
#include "caf/variant.hpp" #include "caf/variant.hpp"
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -180,5 +179,4 @@ error nonblocking(socket x, bool new_value) { ...@@ -180,5 +179,4 @@ error nonblocking(socket x, bool new_value) {
#endif // CAF_WINDOWS #endif // CAF_WINDOWS
} // namespace net
} // namespace caf } // namespace caf
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "caf/config.hpp" #include "caf/config.hpp"
#include "caf/net/multiplexer.hpp" #include "caf/net/multiplexer.hpp"
namespace caf { namespace caf::net {
namespace net {
socket_manager::socket_manager(socket handle, const multiplexer_ptr& parent) socket_manager::socket_manager(socket handle, const multiplexer_ptr& parent)
: handle_(handle), mask_(operation::none), parent_(parent) { : handle_(handle), mask_(operation::none), parent_(parent) {
...@@ -68,5 +67,4 @@ void socket_manager::register_writing() { ...@@ -68,5 +67,4 @@ void socket_manager::register_writing() {
ptr->register_writing(this); ptr->register_writing(this);
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
# include <sys/uio.h> # include <sys/uio.h>
#endif #endif
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -234,5 +233,4 @@ check_stream_socket_io_res(std::make_signed<size_t>::type res) { ...@@ -234,5 +233,4 @@ check_stream_socket_io_res(std::make_signed<size_t>::type res) {
return static_cast<size_t>(res); return static_cast<size_t>(res);
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
#include "caf/net/tcp_stream_socket.hpp" #include "caf/net/tcp_stream_socket.hpp"
#include "caf/sec.hpp" #include "caf/sec.hpp"
namespace caf { namespace caf::net {
namespace net {
namespace { namespace {
...@@ -145,5 +144,4 @@ expected<tcp_stream_socket> accept(tcp_accept_socket x) { ...@@ -145,5 +144,4 @@ expected<tcp_stream_socket> accept(tcp_accept_socket x) {
return tcp_stream_socket{sock}; return tcp_stream_socket{sock};
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include "caf/sec.hpp" #include "caf/sec.hpp"
#include "caf/variant.hpp" #include "caf/variant.hpp"
namespace caf { namespace caf::net {
namespace net {
namespace { namespace {
...@@ -96,5 +95,4 @@ make_connected_tcp_stream_socket(const uri::authority_type& node) { ...@@ -96,5 +95,4 @@ make_connected_tcp_stream_socket(const uri::authority_type& node) {
return make_error(sec::cannot_connect_to_node, to_string(node)); return make_error(sec::cannot_connect_to_node, to_string(node));
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include "caf/net/socket_guard.hpp" #include "caf/net/socket_guard.hpp"
#include "caf/span.hpp" #include "caf/span.hpp"
namespace caf { namespace caf::net {
namespace net {
#ifdef CAF_WINDOWS #ifdef CAF_WINDOWS
...@@ -191,5 +190,4 @@ check_udp_datagram_socket_io_res(std::make_signed<size_t>::type res) { ...@@ -191,5 +190,4 @@ check_udp_datagram_socket_io_res(std::make_signed<size_t>::type res) {
return static_cast<size_t>(res); return static_cast<size_t>(res);
} }
} // namespace net
} // namespace caf } // namespace caf
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
#include "caf/proxy_registry.hpp" #include "caf/proxy_registry.hpp"
#include "caf/scheduler/abstract_coordinator.hpp" #include "caf/scheduler/abstract_coordinator.hpp"
namespace caf { namespace caf::net::basp {
namespace net {
namespace basp {
// -- constructors, destructors, and assignment operators ---------------------- // -- constructors, destructors, and assignment operators ----------------------
...@@ -60,6 +58,4 @@ resumable::resume_result worker::resume(execution_unit* ctx, size_t) { ...@@ -60,6 +58,4 @@ resumable::resume_result worker::resume(execution_unit* ctx, size_t) {
return resumable::awaiting_message; return resumable::awaiting_message;
} }
} // namespace basp
} // namespace net
} // namespace caf } // namespace caf
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