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
61fa2989
Commit
61fa2989
authored
Jan 20, 2022
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on GCC
parent
8914a836
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
24 deletions
+11
-24
libcaf_net/caf/net/length_prefix_framing.hpp
libcaf_net/caf/net/length_prefix_framing.hpp
+0
-1
libcaf_net/caf/net/message_flow_bridge.hpp
libcaf_net/caf/net/message_flow_bridge.hpp
+9
-21
libcaf_net/src/pollset_updater.cpp
libcaf_net/src/pollset_updater.cpp
+2
-2
No files found.
libcaf_net/caf/net/length_prefix_framing.hpp
View file @
61fa2989
...
@@ -213,7 +213,6 @@ public:
...
@@ -213,7 +213,6 @@ public:
return
std
::
make_pair
(
msg_size
,
buffer
.
subspan
(
sizeof
(
uint32_t
)));
return
std
::
make_pair
(
msg_size
,
buffer
.
subspan
(
sizeof
(
uint32_t
)));
}
}
private:
private:
// -- implementation details -------------------------------------------------
// -- implementation details -------------------------------------------------
...
...
libcaf_net/caf/net/message_flow_bridge.hpp
View file @
61fa2989
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#pragma once
#pragma once
#include "caf/actor_system.hpp"
#include "caf/actor_system.hpp"
#include "caf/async/spsc_buffer.hpp"
#include "caf/net/consumer_adapter.hpp"
#include "caf/net/consumer_adapter.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/producer_adapter.hpp"
#include "caf/net/producer_adapter.hpp"
...
@@ -33,30 +34,17 @@ class message_flow_bridge : public caf::tag::no_auto_reading {
...
@@ -33,30 +34,17 @@ class message_flow_bridge : public caf::tag::no_auto_reading {
public:
public:
using
input_tag
=
caf
::
tag
::
message_oriented
;
using
input_tag
=
caf
::
tag
::
message_oriented
;
using
consumer_resource
=
async
::
consumer_resource
<
T
>
;
using
buffer_type
=
caf
::
async
::
spsc_buffer
<
T
>
;
using
consumer_buffer
=
typename
consumer_resource
::
buffer_type
;
using
consumer_adapter_ptr
=
consumer_adapter_ptr
<
consumer_buffer
>
;
using
consumer_adapter
=
typename
consumer_adapter_ptr
::
element_type
;
using
producer_resource
=
async
::
producer_resource
<
T
>
;
using
producer_buffer
=
typename
producer_resource
::
buffer_type
;
using
producer_adapter_ptr
=
producer_adapter_ptr
<
producer_buffer
>
;
using
producer_adapter
=
typename
producer_adapter_ptr
::
element_type
;
explicit
message_flow_bridge
(
Trait
trait
)
:
trait_
(
std
::
move
(
trait
))
{
explicit
message_flow_bridge
(
Trait
trait
)
:
trait_
(
std
::
move
(
trait
))
{
// nop
// nop
}
}
void
connect_flows
(
caf
::
net
::
socket_manager
*
mgr
,
consumer_resource
in
,
void
connect_flows
(
caf
::
net
::
socket_manager
*
mgr
,
producer_resource
out
)
{
async
::
consumer_resource
<
T
>
in
,
in_
=
consumer_adapter
::
try_open
(
mgr
,
in
);
async
::
producer_resource
<
T
>
out
)
{
out_
=
producer_adapter
::
try_open
(
mgr
,
out
);
in_
=
consumer_adapter
<
buffer_type
>::
try_open
(
mgr
,
in
);
out_
=
producer_adapter
<
buffer_type
>::
try_open
(
mgr
,
out
);
}
}
template
<
class
LowerLayerPtr
>
template
<
class
LowerLayerPtr
>
...
@@ -171,10 +159,10 @@ private:
...
@@ -171,10 +159,10 @@ private:
caf
::
net
::
socket_manager
*
mgr_
=
nullptr
;
caf
::
net
::
socket_manager
*
mgr_
=
nullptr
;
/// Incoming messages, serialized to the socket.
/// Incoming messages, serialized to the socket.
consumer_adapter_ptr
in_
;
consumer_adapter_ptr
<
buffer_type
>
in_
;
/// Outgoing messages, deserialized from the socket.
/// Outgoing messages, deserialized from the socket.
producer_adapter_ptr
out_
;
producer_adapter_ptr
<
buffer_type
>
out_
;
/// Converts between raw bytes and items.
/// Converts between raw bytes and items.
Trait
trait_
;
Trait
trait_
;
...
...
libcaf_net/src/pollset_updater.cpp
View file @
61fa2989
...
@@ -35,13 +35,13 @@ namespace {
...
@@ -35,13 +35,13 @@ namespace {
auto
as_mgr
(
intptr_t
ptr
)
{
auto
as_mgr
(
intptr_t
ptr
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
ptr
));
CAF_LOG_TRACE
(
CAF_ARG
(
ptr
));
return
intrusive_ptr
{
reinterpret_cast
<
socket_manager
*>
(
ptr
),
false
};
return
intrusive_ptr
{
reinterpret_cast
<
socket_manager
*>
(
ptr
),
false
};
}
;
}
void
run_action
(
intptr_t
ptr
)
{
void
run_action
(
intptr_t
ptr
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
ptr
));
CAF_LOG_TRACE
(
CAF_ARG
(
ptr
));
auto
f
=
action
{
intrusive_ptr
{
reinterpret_cast
<
action
::
impl
*>
(
ptr
),
false
}};
auto
f
=
action
{
intrusive_ptr
{
reinterpret_cast
<
action
::
impl
*>
(
ptr
),
false
}};
f
.
run
();
f
.
run
();
}
;
}
}
// namespace
}
// namespace
...
...
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