Commit e4558866 authored by Dominik Charousset's avatar Dominik Charousset

Move typed brokers to experimental namespace

Relates #309.
parent ac7dc7c8
......@@ -40,10 +40,12 @@ template <class... Sigs>
class typed_event_based_actor;
namespace io {
namespace experimental {
template <class... Sigs>
class typed_broker;
} // namespace experimental
} // namespace io
/// Identifies a strongly typed actor.
......@@ -83,10 +85,10 @@ public:
using base = typed_event_based_actor<Sigs...>;
/// Identifies pointers to brokers implementing this interface.
using broker_pointer = io::typed_broker<Sigs...>*;
using broker_pointer = io::experimental::typed_broker<Sigs...>*;
/// Identifies the base class of brokers implementing this interface.
using broker_base = io::typed_broker<Sigs...>;
using broker_base = io::experimental::typed_broker<Sigs...>;
typed_actor() = default;
typed_actor(typed_actor&&) = default;
......
......@@ -21,7 +21,6 @@
#define CAF_IO_ALL_HPP
#include "caf/io/broker.hpp"
#include "caf/io/typed_broker.hpp"
#include "caf/io/publish.hpp"
#include "caf/io/spawn_io.hpp"
#include "caf/io/middleman.hpp"
......
......@@ -44,6 +44,7 @@
namespace caf {
namespace io {
namespace experimental {
template <class... Sigs>
class typed_broker;
......@@ -207,6 +208,7 @@ protected:
}
};
} // namespace experimental
} // namespace io
} // namespace caf
......
......@@ -27,9 +27,9 @@
#include "caf/mailbox_element.hpp"
#include "caf/io/middleman.hpp"
#include "caf/io/typed_broker.hpp"
#include "caf/io/abstract_broker.hpp"
#include "caf/io/connection_handle.hpp"
#include "caf/io/experimental/typed_broker.hpp"
#include "caf/io/network/native_socket.hpp"
......@@ -94,6 +94,8 @@ actor spawn_io_server(F fun, uint16_t port, Ts&&... xs) {
std::forward<Ts>(xs)...);
}
namespace experimental {
/// Spawns a new functor-based typed-broker.
template <spawn_options Os = no_spawn_options, class F, class... Ts>
typename infer_typed_actor_handle<
......@@ -150,6 +152,9 @@ spawn_io_server_typed(F fun, uint16_t port, Ts&&... xs) {
std::forward<Ts>(xs)...);
}
} // namespace experimental
} // namespace io
} // namespace caf
......
......@@ -26,6 +26,8 @@
#include "caf/all.hpp"
#include "caf/io/all.hpp"
#include "caf/io/experimental/typed_broker.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/detail/run_program.hpp"
......@@ -33,6 +35,7 @@
using namespace std;
using namespace caf;
using namespace caf::io;
using namespace caf::io::experimental;
namespace {
......@@ -176,7 +179,7 @@ acceptor::behavior_type acceptor_fun(acceptor::broker_pointer self,
void run_server(bool spawn_client, const char* bin_path) {
scoped_actor self;
auto serv = io::spawn_io_typed(acceptor_fun, spawn(pong));
auto serv = spawn_io_typed(acceptor_fun, spawn(pong));
self->sync_send(serv, publish_atom::value).await(
[&](uint16_t port) {
CAF_MESSAGE("server is running on port " << port);
......
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