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
d6e4b796
Commit
d6e4b796
authored
May 17, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve logging in stream_serv implementation
parent
3b243eb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
libcaf_io/src/middleman.cpp
libcaf_io/src/middleman.cpp
+8
-3
No files found.
libcaf_io/src/middleman.cpp
View file @
d6e4b796
...
@@ -290,6 +290,7 @@ void middleman::start() {
...
@@ -290,6 +290,7 @@ void middleman::start() {
behavior
make_behavior
()
override
{
behavior
make_behavior
()
override
{
return
{
return
{
[
=
](
stream_msg
&
x
)
->
delegated
<
message
>
{
[
=
](
stream_msg
&
x
)
->
delegated
<
message
>
{
CAF_LOG_TRACE
(
CAF_ARG
(
x
));
// Dispatching depends on the direction of the message.
// Dispatching depends on the direction of the message.
if
(
outgoing_
.
has_stream
(
x
.
sid
))
{
if
(
outgoing_
.
has_stream
(
x
.
sid
))
{
outgoing_
(
x
);
outgoing_
(
x
);
...
@@ -299,13 +300,13 @@ void middleman::start() {
...
@@ -299,13 +300,13 @@ void middleman::start() {
return
{};
return
{};
},
},
[
=
](
sys_atom
,
stream_msg
&
x
)
->
delegated
<
message
>
{
[
=
](
sys_atom
,
stream_msg
&
x
)
->
delegated
<
message
>
{
// Stream message received from a proxy, always results in a new
CAF_LOG_TRACE
(
CAF_ARG
(
x
));
// stream from a local actor to a remote node.
// Stream message received from a proxy
CAF_ASSERT
(
holds_alternative
<
stream_msg
::
open
>
(
x
.
content
));
outgoing_
(
x
);
outgoing_
(
x
);
return
{};
return
{};
},
},
[
=
](
sys_atom
,
ok_atom
,
int32_t
credit
)
{
[
=
](
sys_atom
,
ok_atom
,
int32_t
credit
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
credit
));
CAF_ASSERT
(
current_mailbox_element
()
!=
nullptr
);
CAF_ASSERT
(
current_mailbox_element
()
!=
nullptr
);
auto
cme
=
current_mailbox_element
();
auto
cme
=
current_mailbox_element
();
if
(
cme
->
sender
!=
nullptr
)
{
if
(
cme
->
sender
!=
nullptr
)
{
...
@@ -316,16 +317,19 @@ void middleman::start() {
...
@@ -316,16 +317,19 @@ void middleman::start() {
}
}
},
},
[
=
](
exit_msg
&
x
)
{
[
=
](
exit_msg
&
x
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
x
));
if
(
x
.
reason
)
if
(
x
.
reason
)
quit
(
x
.
reason
);
quit
(
x
.
reason
);
},
},
// Connects both incoming_ and outgoing_ to nid.
// Connects both incoming_ and outgoing_ to nid.
[
=
](
connect_atom
,
const
node_id
&
nid
)
{
[
=
](
connect_atom
,
const
node_id
&
nid
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
nid
));
send
(
basp_
,
forward_atom
::
value
,
nid
,
atom
(
"ConfigServ"
),
send
(
basp_
,
forward_atom
::
value
,
nid
,
atom
(
"ConfigServ"
),
make_message
(
get_atom
::
value
,
atom
(
"StreamServ"
)));
make_message
(
get_atom
::
value
,
atom
(
"StreamServ"
)));
},
},
// Assumes `ptr` is a remote spawn server.
// Assumes `ptr` is a remote spawn server.
[
=
](
strong_actor_ptr
&
ptr
)
{
[
=
](
strong_actor_ptr
&
ptr
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
ptr
));
if
(
ptr
)
{
if
(
ptr
)
{
add_remote_path
(
ptr
->
node
(),
ptr
);
add_remote_path
(
ptr
->
node
(),
ptr
);
}
}
...
@@ -334,6 +338,7 @@ void middleman::start() {
...
@@ -334,6 +338,7 @@ void middleman::start() {
}
}
strong_actor_ptr
remote_stream_serv
(
const
node_id
&
nid
)
override
{
strong_actor_ptr
remote_stream_serv
(
const
node_id
&
nid
)
override
{
CAF_LOG_TRACE
(
CAF_ARG
(
nid
));
strong_actor_ptr
result
;
strong_actor_ptr
result
;
// Ask remote config server for a handle to the remote spawn server.
// Ask remote config server for a handle to the remote spawn server.
scoped_actor
self
{
system
()};
scoped_actor
self
{
system
()};
...
...
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