Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
f0f3f394
Commit
f0f3f394
authored
Jan 25, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix use of constants for spawn/config server
parent
47cc0c8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
libcaf_io/caf/io/basp/header.hpp
libcaf_io/caf/io/basp/header.hpp
+0
-1
libcaf_io/src/io/middleman_actor_impl.cpp
libcaf_io/src/io/middleman_actor_impl.cpp
+8
-7
libcaf_io/test/io/basp_broker.cpp
libcaf_io/test/io/basp_broker.cpp
+7
-7
No files found.
libcaf_io/caf/io/basp/header.hpp
View file @
f0f3f394
...
...
@@ -57,7 +57,6 @@ struct header {
dest_actor
(
m_dest_actor
)
{
// nop
}
header
()
=
default
;
/// Identifies a receiver by name rather than ID.
...
...
libcaf_io/src/io/middleman_actor_impl.cpp
View file @
f0f3f394
...
...
@@ -25,18 +25,17 @@
#include "caf/actor.hpp"
#include "caf/actor_proxy.hpp"
#include "caf/actor_system_config.hpp"
#include "caf/io/basp/header.hpp"
#include "caf/io/basp_broker.hpp"
#include "caf/io/network/default_multiplexer.hpp"
#include "caf/io/network/interfaces.hpp"
#include "caf/io/system_messages.hpp"
#include "caf/logger.hpp"
#include "caf/node_id.hpp"
#include "caf/sec.hpp"
#include "caf/send.hpp"
#include "caf/typed_event_based_actor.hpp"
#include "caf/io/basp_broker.hpp"
#include "caf/io/system_messages.hpp"
#include "caf/io/network/default_multiplexer.hpp"
#include "caf/io/network/interfaces.hpp"
namespace
caf
::
io
{
middleman_actor_impl
::
middleman_actor_impl
(
actor_config
&
cfg
,
...
...
@@ -152,7 +151,9 @@ auto middleman_actor_impl::make_behavior() -> behavior_type {
[
=
](
spawn_atom
atm
,
node_id
&
nid
,
std
::
string
&
str
,
message
&
msg
,
std
::
set
<
std
::
string
>&
ifs
)
->
delegated
<
strong_actor_ptr
>
{
CAF_LOG_TRACE
(
""
);
static
constexpr
uint64_t
id
=
1u
;
// SpawnServ
// This local variable prevents linker errors (delegate forms an lvalue
// reference but spawn_server_id is constexpr).
auto
id
=
basp
::
header
::
spawn_server_id
;
delegate
(
broker_
,
forward_atom_v
,
nid
,
id
,
make_message
(
atm
,
std
::
move
(
str
),
std
::
move
(
msg
),
std
::
move
(
ifs
)));
...
...
libcaf_io/test/io/basp_broker.cpp
View file @
f0f3f394
...
...
@@ -76,9 +76,9 @@ constexpr uint64_t default_operation_data = make_message_id().integer_value();
constexpr
uint32_t
num_remote_nodes
=
2
;
constexpr
uint64_t
spawn_serv_id
=
2
;
constexpr
uint64_t
spawn_serv_id
=
basp
::
header
::
spawn_server_id
;
constexpr
uint64_t
config_serv_id
=
2
;
constexpr
uint64_t
config_serv_id
=
basp
::
header
::
config_server_id
;
std
::
string
hexstr
(
const
byte_buffer
&
buf
)
{
return
deep_to_string
(
meta
::
hex_formatted
(),
buf
);
...
...
@@ -274,7 +274,7 @@ public:
// whether there is a SpawnServ actor on this node
.
receive
(
hdl
,
basp
::
message_type
::
direct_message
,
basp
::
header
::
named_receiver_flag
,
any_vals
,
default_operation_data
,
any_vals
,
config
_serv_id
,
default_operation_data
,
any_vals
,
spawn
_serv_id
,
std
::
vector
<
strong_actor_ptr
>
{},
make_message
(
sys_atom_v
,
get_atom_v
,
"info"
));
// test whether basp instance correctly updates the
...
...
@@ -586,7 +586,7 @@ CAF_TEST(remote_actor_and_send) {
invalid_actor_id
,
this_node
())
.
receive
(
jupiter
().
connection
,
basp
::
message_type
::
direct_message
,
basp
::
header
::
named_receiver_flag
,
any_vals
,
default_operation_data
,
any_vals
,
config
_serv_id
,
default_operation_data
,
any_vals
,
spawn
_serv_id
,
std
::
vector
<
strong_actor_ptr
>
{},
make_message
(
sys_atom_v
,
get_atom_v
,
"info"
))
.
receive
(
jupiter
().
connection
,
basp
::
message_type
::
monitor_message
,
...
...
@@ -682,7 +682,7 @@ CAF_TEST(indirect_connections) {
// this asks Jupiter if it has a 'SpawnServ'
mx
.
receive
(
mars
().
connection
,
basp
::
message_type
::
routed_message
,
basp
::
header
::
named_receiver_flag
,
any_vals
,
default_operation_data
,
any_vals
,
config
_serv_id
,
this_node
(),
default_operation_data
,
any_vals
,
spawn
_serv_id
,
this_node
(),
jupiter
().
id
,
std
::
vector
<
strong_actor_ptr
>
{},
make_message
(
sys_atom_v
,
get_atom_v
,
"info"
));
CAF_MESSAGE
(
"expect announce_proxy message at Mars from Earth to Jupiter"
);
...
...
@@ -733,14 +733,14 @@ CAF_TEST(automatic_connection) {
make_message
(
"hello from jupiter!"
))
.
receive
(
mars
().
connection
,
basp
::
message_type
::
routed_message
,
basp
::
header
::
named_receiver_flag
,
any_vals
,
default_operation_data
,
any_vals
,
config
_serv_id
,
this_node
(),
default_operation_data
,
any_vals
,
spawn
_serv_id
,
this_node
(),
jupiter
().
id
,
std
::
vector
<
strong_actor_ptr
>
{},
make_message
(
sys_atom_v
,
get_atom_v
,
"info"
))
.
receive
(
mars
().
connection
,
basp
::
message_type
::
routed_message
,
basp
::
header
::
named_receiver_flag
,
any_vals
,
default_operation_data
,
any_vals
,
// actor ID of an actor spawned by the BASP broker
spawn
_serv_id
,
this_node
(),
jupiter
().
id
,
config
_serv_id
,
this_node
(),
jupiter
().
id
,
std
::
vector
<
strong_actor_ptr
>
{},
make_message
(
get_atom_v
,
"basp.default-connectivity-tcp"
))
.
receive
(
mars
().
connection
,
basp
::
message_type
::
monitor_message
,
no_flags
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment