Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
c4e5343e
Commit
c4e5343e
authored
Oct 11, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor packet_writer_impl
parent
e8ca5421
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
libcaf_net/caf/net/packet_writer.hpp
libcaf_net/caf/net/packet_writer.hpp
+1
-1
libcaf_net/caf/net/packet_writer_impl.hpp
libcaf_net/caf/net/packet_writer_impl.hpp
+2
-10
No files found.
libcaf_net/caf/net/packet_writer.hpp
View file @
c4e5343e
...
...
@@ -42,7 +42,7 @@ public:
// Following buffers are one or more payload buffers for this packet.
/// @warning takes ownership of `buffers`.
template
<
class
...
Ts
>
void
write_packet
(
Ts
...
buffers
)
{
void
write_packet
(
Ts
&
...
buffers
)
{
buffer_type
*
bufs
[]
=
{
&
buffers
...};
write_impl
(
make_span
(
bufs
,
sizeof
...(
Ts
)));
}
...
...
libcaf_net/caf/net/packet_writer_impl.hpp
View file @
c4e5343e
...
...
@@ -68,13 +68,6 @@ public:
// -- member functions -------------------------------------------------------
template
<
class
...
Ts
>
void
write_packet
(
span
<
const
byte
>
header
,
span
<
const
byte
>
payload
,
Ts
&&
...
xs
)
{
parent_
.
write_packet
(
header
,
payload
,
std
::
forward
<
Ts
>
(
xs
)...,
object_
.
id
());
}
void
cancel_timeout
(
atom_value
type
,
uint64_t
id
)
{
parent_
.
cancel_timeout
(
type
,
id
);
}
...
...
@@ -85,9 +78,8 @@ public:
}
protected:
// TODO: this should replace the current `write_packet()`
void
write_impl
(
span
<
buffer_type
*>
)
override
{
// parent_.write_packet(buffers);
void
write_impl
(
span
<
buffer_type
*>
buffers
)
override
{
parent_
.
write_packet
(
object_
.
id
(),
buffers
);
}
private:
...
...
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