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
421aa67f
Commit
421aa67f
authored
Nov 13, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup dispatcher and worker
parent
c84b6b6c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
18 deletions
+13
-18
libcaf_net/caf/net/datagram_transport.hpp
libcaf_net/caf/net/datagram_transport.hpp
+1
-0
libcaf_net/caf/net/transport_worker.hpp
libcaf_net/caf/net/transport_worker.hpp
+5
-9
libcaf_net/caf/net/transport_worker_dispatcher.hpp
libcaf_net/caf/net/transport_worker_dispatcher.hpp
+5
-8
libcaf_net/test/transport_worker.cpp
libcaf_net/test/transport_worker.cpp
+1
-1
libcaf_net/test/transport_worker_dispatcher.cpp
libcaf_net/test/transport_worker_dispatcher.cpp
+1
-0
No files found.
libcaf_net/caf/net/datagram_transport.hpp
View file @
421aa67f
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <vector>
#include <vector>
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
#include "caf/ip_endpoint.hpp"
#include "caf/logger.hpp"
#include "caf/logger.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/fwd.hpp"
...
...
libcaf_net/caf/net/transport_worker.hpp
View file @
421aa67f
...
@@ -18,16 +18,12 @@
...
@@ -18,16 +18,12 @@
#pragma once
#pragma once
#include "caf/byte.hpp"
#include "caf/net/endpoint_manager_queue.hpp"
#include "caf/ip_endpoint.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/packet_writer_decorator.hpp"
#include "caf/net/packet_writer_decorator.hpp"
#include "caf/span.hpp"
#include "caf/unit.hpp"
#include "caf/unit.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Implements a worker for transport protocols.
/// Implements a worker for transport protocols.
template
<
class
Application
,
class
IdType
>
template
<
class
Application
,
class
IdType
>
...
@@ -41,7 +37,8 @@ public:
...
@@ -41,7 +37,8 @@ public:
// -- constructors, destructors, and assignment operators --------------------
// -- constructors, destructors, and assignment operators --------------------
transport_worker
(
application_type
application
,
id_type
id
=
id_type
{})
explicit
transport_worker
(
application_type
application
,
id_type
id
=
id_type
{})
:
application_
(
std
::
move
(
application
)),
id_
(
std
::
move
(
id
))
{
:
application_
(
std
::
move
(
application
)),
id_
(
std
::
move
(
id
))
{
// nop
// nop
}
}
...
@@ -119,5 +116,4 @@ template <class Application, class IdType = unit_t>
...
@@ -119,5 +116,4 @@ template <class Application, class IdType = unit_t>
using
transport_worker_ptr
=
std
::
shared_ptr
<
using
transport_worker_ptr
=
std
::
shared_ptr
<
transport_worker
<
Application
,
IdType
>>
;
transport_worker
<
Application
,
IdType
>>
;
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/transport_worker_dispatcher.hpp
View file @
421aa67f
...
@@ -18,19 +18,15 @@
...
@@ -18,19 +18,15 @@
#pragma once
#pragma once
#include <caf/logger.hpp>
#include <caf/sec.hpp>
#include <unordered_map>
#include <unordered_map>
#include "caf/byte.hpp"
#include "caf/logger.hpp"
#include "caf/ip_endpoint.hpp"
#include "caf/net/endpoint_manager_queue.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/packet_writer_decorator.hpp"
#include "caf/net/packet_writer_decorator.hpp"
#include "caf/net/transport_worker.hpp"
#include "caf/net/transport_worker.hpp"
#include "caf/sec.hpp"
#include "caf/send.hpp"
#include "caf/send.hpp"
#include "caf/span.hpp"
#include "caf/unit.hpp"
namespace
caf
::
net
{
namespace
caf
::
net
{
...
@@ -52,7 +48,7 @@ public:
...
@@ -52,7 +48,7 @@ public:
// -- constructors, destructors, and assignment operators --------------------
// -- constructors, destructors, and assignment operators --------------------
transport_worker_dispatcher
(
factory_type
factory
)
explicit
transport_worker_dispatcher
(
factory_type
factory
)
:
factory_
(
std
::
move
(
factory
))
{
:
factory_
(
std
::
move
(
factory
))
{
// nop
// nop
}
}
...
@@ -138,6 +134,7 @@ public:
...
@@ -138,6 +134,7 @@ public:
template
<
class
Parent
>
template
<
class
Parent
>
expected
<
worker_ptr
>
add_new_worker
(
Parent
&
parent
,
node_id
node
,
expected
<
worker_ptr
>
add_new_worker
(
Parent
&
parent
,
node_id
node
,
id_type
id
)
{
id_type
id
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
node
)
<<
CAF_ARG
(
id
));
auto
application
=
factory_
.
make
();
auto
application
=
factory_
.
make
();
auto
worker
=
std
::
make_shared
<
worker_type
>
(
std
::
move
(
application
),
id
);
auto
worker
=
std
::
make_shared
<
worker_type
>
(
std
::
move
(
application
),
id
);
if
(
auto
err
=
worker
->
init
(
parent
))
if
(
auto
err
=
worker
->
init
(
parent
))
...
...
libcaf_net/test/transport_worker.cpp
View file @
421aa67f
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
#include "caf/byte.hpp"
#include "caf/byte.hpp"
#include "caf/detail/scope_guard.hpp"
#include "caf/detail/scope_guard.hpp"
#include "caf/ip_endpoint.hpp"
#include "caf/make_actor.hpp"
#include "caf/make_actor.hpp"
#include "caf/net/actor_proxy_impl.hpp"
#include "caf/net/actor_proxy_impl.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/serializer_impl.hpp"
#include "caf/serializer_impl.hpp"
#include "caf/span.hpp"
#include "caf/span.hpp"
...
...
libcaf_net/test/transport_worker_dispatcher.cpp
View file @
421aa67f
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "caf/net/test/host_fixture.hpp"
#include "caf/net/test/host_fixture.hpp"
#include "caf/test/dsl.hpp"
#include "caf/test/dsl.hpp"
#include "caf/ip_endpoint.hpp"
#include "caf/make_actor.hpp"
#include "caf/make_actor.hpp"
#include "caf/monitorable_actor.hpp"
#include "caf/monitorable_actor.hpp"
#include "caf/node_id.hpp"
#include "caf/node_id.hpp"
...
...
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