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
de76b158
Commit
de76b158
authored
Jan 14, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor basp_broker::dispatch
parent
0b60118b
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
74 deletions
+128
-74
libcaf_io/caf/io/basp_broker.hpp
libcaf_io/caf/io/basp_broker.hpp
+20
-1
libcaf_io/src/basp_broker.cpp
libcaf_io/src/basp_broker.cpp
+108
-73
No files found.
libcaf_io/caf/io/basp_broker.hpp
View file @
de76b158
...
@@ -55,6 +55,25 @@ class basp_broker : public broker, public actor_namespace::backend {
...
@@ -55,6 +55,25 @@ class basp_broker : public broker, public actor_namespace::backend {
actor_proxy_ptr
make_proxy
(
const
node_id
&
,
actor_id
)
override
;
actor_proxy_ptr
make_proxy
(
const
node_id
&
,
actor_id
)
override
;
class
payload_writer
{
public:
payload_writer
()
=
default
;
payload_writer
(
const
payload_writer
&
)
=
default
;
payload_writer
&
operator
=
(
const
payload_writer
&
)
=
default
;
virtual
~
payload_writer
();
virtual
void
write
(
binary_serializer
&
)
=
0
;
};
void
dispatch
(
connection_handle
hdl
,
uint32_t
operation
,
const
node_id
&
src_node
,
actor_id
src_actor
,
const
node_id
&
dest_node
,
actor_id
dest_actor
,
uint64_t
op_data
=
0
,
payload_writer
*
writer
=
nullptr
);
node_id
dispatch
(
uint32_t
operation
,
const
node_id
&
src_node
,
actor_id
src_actor
,
const
node_id
&
dest_node
,
actor_id
dest_actor
,
uint64_t
op_data
=
0
,
payload_writer
*
writer
=
nullptr
);
// dispatches a message from a local actor to a remote node
// dispatches a message from a local actor to a remote node
void
dispatch
(
const
actor_addr
&
from
,
const
actor_addr
&
to
,
void
dispatch
(
const
actor_addr
&
from
,
const
actor_addr
&
to
,
message_id
mid
,
const
message
&
msg
);
message_id
mid
,
const
message
&
msg
);
...
@@ -73,7 +92,7 @@ class basp_broker : public broker, public actor_namespace::backend {
...
@@ -73,7 +92,7 @@ class basp_broker : public broker, public actor_namespace::backend {
void
erase_proxy
(
const
node_id
&
nid
,
actor_id
aid
);
void
erase_proxy
(
const
node_id
&
nid
,
actor_id
aid
);
// dispatches a message from a remote node to a local actor
// dispatches a message from a remote node to a local actor
void
dispatch
(
const
basp
::
header
&
msg
,
message
&&
payload
);
void
local_
dispatch
(
const
basp
::
header
&
msg
,
message
&&
payload
);
enum
connection_state
{
enum
connection_state
{
// client just started, await handshake from server
// client just started, await handshake from server
...
...
libcaf_io/src/basp_broker.cpp
View file @
de76b158
This diff is collapsed.
Click to expand it.
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