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
b0e93f0e
Commit
b0e93f0e
authored
Oct 03, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CAF tag, remove legacy API
parent
823b8ad1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
68 deletions
+0
-68
libcaf_net/caf/net/endpoint_manager_impl.hpp
libcaf_net/caf/net/endpoint_manager_impl.hpp
+0
-12
libcaf_net/caf/net/packet_writer_decorator.hpp
libcaf_net/caf/net/packet_writer_decorator.hpp
+0
-11
libcaf_net/caf/net/transport_base.hpp
libcaf_net/caf/net/transport_base.hpp
+0
-18
libcaf_net/caf/net/transport_worker_dispatcher.hpp
libcaf_net/caf/net/transport_worker_dispatcher.hpp
+0
-13
libcaf_net/test/transport_worker_dispatcher.cpp
libcaf_net/test/transport_worker_dispatcher.cpp
+0
-14
No files found.
libcaf_net/caf/net/endpoint_manager_impl.hpp
View file @
b0e93f0e
...
...
@@ -45,18 +45,6 @@ public:
return
*
this
;
}
// -- timeout management -----------------------------------------------------
template
<
class
...
Ts
>
uint64_t
set_timeout
(
actor_clock
::
time_point
tp
,
std
::
string
type
,
Ts
&&
...
xs
)
{
auto
act
=
actor_cast
<
abstract_actor
*>
(
timeout_proxy_
);
CAF_ASSERT
(
act
!=
nullptr
);
sys_
.
clock
().
set_multi_timeout
(
tp
,
act
,
std
::
move
(
type
),
next_timeout_id_
);
transport_
.
set_timeout
(
next_timeout_id_
,
std
::
forward
<
Ts
>
(
xs
)...);
return
next_timeout_id_
++
;
}
// -- interface functions ----------------------------------------------------
error
init
()
/*override*/
{
...
...
libcaf_net/caf/net/packet_writer_decorator.hpp
View file @
b0e93f0e
...
...
@@ -51,17 +51,6 @@ public:
return
transport
().
next_payload_buffer
();
}
// -- member functions -------------------------------------------------------
void
cancel_timeout
(
std
::
string
tag
,
uint64_t
id
)
{
parent_
.
cancel_timeout
(
std
::
move
(
tag
),
id
);
}
template
<
class
...
Ts
>
uint64_t
set_timeout
(
timestamp
tout
,
std
::
string
tag
,
Ts
&&
...
xs
)
{
return
parent_
.
set_timeout
(
tout
,
std
::
move
(
tag
),
std
::
forward
<
Ts
>
(
xs
)...);
}
protected:
void
write_impl
(
span
<
byte_buffer
*>
buffers
)
override
{
parent_
.
write_packet
(
object_
.
id
(),
buffers
);
...
...
libcaf_net/caf/net/transport_base.hpp
View file @
b0e93f0e
...
...
@@ -133,24 +133,6 @@ public:
next_layer_
.
local_actor_down
(
*
this
,
peer
,
id
,
std
::
move
(
reason
));
}
/// Notifies the transport that the timeout identified by `value` plus `id`
/// was triggered.
/// @param tag The type tag of the timeout.
/// @param id The timeout id of the timeout.
void
timeout
(
endpoint_manager
&
,
std
::
string
tag
,
uint64_t
id
)
{
next_layer_
.
timeout
(
*
this
,
std
::
move
(
tag
),
id
);
}
/// Callback for setting a timeout. Will be called after setting a timeout to
/// get the timeout id for local use.
/// @param timeout_id The id of the previously set timeout.
/// @param ts Any further information that was passed when setting the
/// timeout.
template
<
class
...
Ts
>
void
set_timeout
(
uint64_t
timeout_id
,
Ts
&&
...
ts
)
{
next_layer_
.
set_timeout
(
timeout_id
,
std
::
forward
<
Ts
>
(
ts
)...);
}
/// Callback for when an error occurs.
/// @param code The error code to handle.
void
handle_error
(
sec
code
)
{
...
...
libcaf_net/caf/net/transport_worker_dispatcher.hpp
View file @
b0e93f0e
...
...
@@ -97,19 +97,6 @@ public:
worker
->
local_actor_down
(
parent
,
nid
,
id
,
std
::
move
(
reason
));
}
template
<
class
...
Ts
>
void
set_timeout
(
uint64_t
timeout_id
,
id_type
id
,
Ts
&&
...)
{
workers_by_timeout_id_
.
emplace
(
timeout_id
,
workers_by_id_
.
at
(
id
));
}
template
<
class
Parent
>
void
timeout
(
Parent
&
parent
,
std
::
string
tag
,
uint64_t
id
)
{
if
(
auto
worker
=
workers_by_timeout_id_
.
at
(
id
))
{
worker
->
timeout
(
parent
,
std
::
move
(
tag
),
id
);
workers_by_timeout_id_
.
erase
(
id
);
}
}
void
handle_error
(
sec
error
)
{
for
(
const
auto
&
p
:
workers_by_id_
)
{
auto
worker
=
p
.
second
;
...
...
libcaf_net/test/transport_worker_dispatcher.cpp
View file @
b0e93f0e
...
...
@@ -254,13 +254,6 @@ struct fixture : host_fixture {
memcmp(buf->data() + 1, hello_test.data(), hello_test.size()), 0); \
buf->clear();
#define CHECK_TIMEOUT(testcase) \
dispatcher.set_timeout(1u, testcase.ep); \
dispatcher.timeout(dummy, "dummy", 1u); \
CAF_CHECK_EQUAL(buf->size(), 1u); \
CAF_CHECK_EQUAL(static_cast<byte>(testcase.worker_id), buf->at(0)); \
buf->clear();
}
// namespace
CAF_TEST_FIXTURE_SCOPE
(
transport_worker_dispatcher_test
,
fixture
)
...
...
@@ -288,13 +281,6 @@ CAF_TEST(resolve) {
// TODO think of a test for this
}
CAF_TEST
(
timeout
)
{
CHECK_TIMEOUT
(
test_data
.
at
(
0
));
CHECK_TIMEOUT
(
test_data
.
at
(
1
));
CHECK_TIMEOUT
(
test_data
.
at
(
2
));
CHECK_TIMEOUT
(
test_data
.
at
(
3
));
}
CAF_TEST
(
handle_error
)
{
dispatcher
.
handle_error
(
sec
::
unavailable_or_would_block
);
CAF_CHECK_EQUAL
(
buf
->
size
(),
4u
);
...
...
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