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
b14bcc85
Commit
b14bcc85
authored
Jun 03, 2020
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
674bb331
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
libcaf_net/caf/net/middleman.hpp
libcaf_net/caf/net/middleman.hpp
+7
-5
libcaf_net/src/net/backend/tcp.cpp
libcaf_net/src/net/backend/tcp.cpp
+3
-3
No files found.
libcaf_net/caf/net/middleman.hpp
View file @
b14bcc85
...
...
@@ -79,7 +79,7 @@ public:
expected
<
endpoint_manager_ptr
>
connect
(
const
uri
&
locator
);
// Publishes an actor.
template
<
class
Handle
=
actor
>
template
<
class
Handle
>
void
publish
(
Handle
whom
,
const
std
::
string
&
path
)
{
system
().
registry
().
put
(
path
,
whom
);
}
...
...
@@ -87,8 +87,11 @@ public:
/// Resolves a path to a remote actor.
void
resolve
(
const
uri
&
locator
,
const
actor
&
listener
);
template
<
class
Handle
=
actor
>
expected
<
Handle
>
remote_actor
(
const
uri
&
locator
)
{
template
<
class
Handle
=
actor
,
class
Rep
,
class
Period
>
expected
<
Handle
>
remote_actor
(
const
uri
&
locator
,
std
::
chrono
::
duration
<
Rep
,
Period
>
timeout_duration
=
std
::
chrono
::
seconds
(
5
))
{
scoped_actor
self
{
sys_
};
resolve
(
locator
,
self
);
Handle
handle
;
...
...
@@ -98,8 +101,7 @@ public:
handle
=
actor_cast
<
Handle
>
(
std
::
move
(
ptr
));
},
[
&
err
](
const
error
&
e
)
{
err
=
e
;
},
// TODO: how long should the middleman wait before erroring out?
after
(
std
::
chrono
::
seconds
(
5
))
>>
after
(
timeout_duration
)
>>
[
&
err
]
{
err
=
make_error
(
sec
::
runtime_error
,
"manager did not respond with a proxy."
);
...
...
libcaf_net/src/net/backend/tcp.cpp
View file @
b14bcc85
...
...
@@ -65,9 +65,9 @@ error tcp::init() {
if
(
!
doorman_uri
)
return
doorman_uri
.
error
();
auto
&
mpx
=
mm_
.
mpx
();
auto
mgr
=
make_endpoint_manager
(
mpx
,
mm_
.
system
(),
doorman
{
acc_guard
.
release
(),
tcp
::
basp_application_factory
{
proxies_
}});
auto
mgr
=
make_endpoint_manager
(
mpx
,
mm_
.
system
(),
doorman
{
acc_guard
.
release
(),
basp_application_factory
{
proxies_
}});
if
(
auto
err
=
mgr
->
init
())
{
CAF_LOG_ERROR
(
"mgr->init() failed: "
<<
err
);
return
err
;
...
...
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