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
e774b6a8
Commit
e774b6a8
authored
Oct 23, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement write_packet
parent
16994320
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
libcaf_net/caf/net/datagram_transport.hpp
libcaf_net/caf/net/datagram_transport.hpp
+7
-6
No files found.
libcaf_net/caf/net/datagram_transport.hpp
View file @
e774b6a8
...
@@ -276,12 +276,13 @@ private:
...
@@ -276,12 +276,13 @@ private:
}
}
packet_queue_
.
pop_front
();
packet_queue_
.
pop_front
();
};
};
// TODO: Implement this with span<vector*>
// Write as many bytes as possible.
while
(
!
packet_queue_
.
empty
())
{
// Write buffers from the write_queue_ for as long as possible.
/*while (!packet_queue_.empty()) {
auto
&
packet
=
packet_queue_
.
front
();
auto
&
packet
=
packet_queue_
.
front
();
auto write_ret = write(handle_, make_span(packet.bytes),
std
::
vector
<
std
::
vector
<
byte
>*>
ptrs
;
for
(
auto
&
buf
:
packet
.
bytes
)
ptrs
.
emplace_back
(
&
buf
);
auto
write_ret
=
write
(
handle_
,
make_span
(
ptrs
),
packet
.
destination
);
packet
.
destination
);
if
(
auto
num_bytes
=
get_if
<
size_t
>
(
&
write_ret
))
{
if
(
auto
num_bytes
=
get_if
<
size_t
>
(
&
write_ret
))
{
CAF_LOG_DEBUG
(
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
*
num_bytes
));
CAF_LOG_DEBUG
(
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
*
num_bytes
));
...
@@ -297,7 +298,7 @@ private:
...
@@ -297,7 +298,7 @@ private:
}
}
return
true
;
return
true
;
}
}
}
*/
}
return
false
;
return
false
;
}
}
...
...
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