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
05460af7
Commit
05460af7
authored
Jan 22, 2020
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include review feedback
parent
7a8cac4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
libcaf_net/caf/net/datagram_transport.hpp
libcaf_net/caf/net/datagram_transport.hpp
+6
-4
libcaf_net/caf/net/stream_transport.hpp
libcaf_net/caf/net/stream_transport.hpp
+6
-4
No files found.
libcaf_net/caf/net/datagram_transport.hpp
View file @
05460af7
...
...
@@ -100,12 +100,14 @@ public:
bool
handle_write_event
(
endpoint_manager
&
manager
)
override
{
CAF_LOG_TRACE
(
CAF_ARG2
(
"handle"
,
this
->
handle_
.
id
)
<<
CAF_ARG2
(
"queue-size"
,
packet_queue_
.
size
()));
auto
ge
t_message
=
[
&
]
{
if
(
auto
msg
=
manager
.
next_message
())
auto
fetch_nex
t_message
=
[
&
]
{
if
(
auto
msg
=
manager
.
next_message
())
{
this
->
next_layer_
.
write_message
(
*
this
,
std
::
move
(
msg
));
return
!
packet_queue_
.
empty
();
return
true
;
}
return
false
;
};
while
(
write_some
()
&&
ge
t_message
())
while
(
write_some
()
&&
fetch_nex
t_message
())
;
// nop
return
!
packet_queue_
.
empty
();
}
...
...
libcaf_net/caf/net/stream_transport.hpp
View file @
05460af7
...
...
@@ -107,12 +107,14 @@ public:
bool
handle_write_event
(
endpoint_manager
&
manager
)
override
{
CAF_LOG_TRACE
(
CAF_ARG2
(
"handle"
,
this
->
handle_
.
id
)
<<
CAF_ARG2
(
"queue-size"
,
write_queue_
.
size
()));
auto
ge
t_message
=
[
&
]
{
if
(
auto
msg
=
manager
.
next_message
())
auto
fetch_nex
t_message
=
[
&
]
{
if
(
auto
msg
=
manager
.
next_message
())
{
this
->
next_layer_
.
write_message
(
*
this
,
std
::
move
(
msg
));
return
!
write_queue_
.
empty
();
return
true
;
}
return
false
;
};
while
(
write_some
()
&&
ge
t_message
())
while
(
write_some
()
&&
fetch_nex
t_message
())
;
// nop
return
!
write_queue_
.
empty
();
}
...
...
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