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
a61eaed8
Commit
a61eaed8
authored
Aug 01, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Formatting of Files to match code style
parent
2010f268
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
15 deletions
+9
-15
libcaf_net/caf/net/receive_policy.hpp
libcaf_net/caf/net/receive_policy.hpp
+4
-9
libcaf_net/caf/policy/scribe.hpp
libcaf_net/caf/policy/scribe.hpp
+5
-5
libcaf_net/src/scribe.cpp
libcaf_net/src/scribe.cpp
+0
-1
No files found.
libcaf_net/caf/net/receive_policy.hpp
View file @
a61eaed8
...
...
@@ -18,8 +18,8 @@
#pragma once
#include <string>
#include <cstddef>
#include <string>
#include <utility>
#include "caf/config.hpp"
...
...
@@ -27,16 +27,12 @@
namespace
caf
{
namespace
net
{
enum
class
receive_policy_flag
:
unsigned
{
at_least
,
at_most
,
exactly
};
enum
class
receive_policy_flag
:
unsigned
{
at_least
,
at_most
,
exactly
};
inline
std
::
string
to_string
(
receive_policy_flag
x
)
{
return
x
==
receive_policy_flag
::
at_least
?
"at_least"
:
(
x
==
receive_policy_flag
::
at_most
?
"at_most"
:
"exactly"
);
?
"at_least"
:
(
x
==
receive_policy_flag
::
at_most
?
"at_most"
:
"exactly"
);
}
class
receive_policy
{
...
...
@@ -63,4 +59,3 @@ public:
}
// namespace net
}
// namespace caf
libcaf_net/caf/policy/scribe.hpp
View file @
a61eaed8
...
...
@@ -97,7 +97,8 @@ public:
// try to write leftover data!
write_some
(
parent
);
// get new data from parent
for
(
auto
msg
=
parent
.
next_message
();
msg
!=
nullptr
;
msg
=
parent
.
next_message
())
{
for
(
auto
msg
=
parent
.
next_message
();
msg
!=
nullptr
;
msg
=
parent
.
next_message
())
{
parent
.
application
().
prepare
(
std
::
move
(
msg
),
*
this
);
}
// write prepared data
...
...
@@ -118,11 +119,10 @@ public:
handle_error
(
parent
,
get
<
caf
::
sec
>
(
sres
));
return
false
;
}
CAF_LOG_DEBUG
(
CAF_ARG
(
len
)
<<
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
sres
));
CAF_LOG_DEBUG
(
CAF_ARG
(
len
)
<<
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
sres
));
auto
result
=
(
get
<
size_t
>
(
sres
)
>
0
)
?
static_cast
<
size_t
>
(
get
<
size_t
>
(
sres
))
:
0
;
?
static_cast
<
size_t
>
(
get
<
size_t
>
(
sres
))
:
0
;
// update state
written_
+=
result
;
...
...
libcaf_net/src/scribe.cpp
View file @
a61eaed8
...
...
@@ -62,6 +62,5 @@ std::vector<char>& scribe::wr_buf() {
return
write_buf_
;
}
}
// namespace policy
}
// namespace caf
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