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
8cb6b747
Commit
8cb6b747
authored
Aug 31, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify openssl::remote_actor
parent
7f577f42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
22 deletions
+13
-22
libcaf_openssl/src/remote_actor.cpp
libcaf_openssl/src/remote_actor.cpp
+13
-22
No files found.
libcaf_openssl/src/remote_actor.cpp
View file @
8cb6b747
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "caf/sec.hpp"
#include "caf/sec.hpp"
#include "caf/atom.hpp"
#include "caf/atom.hpp"
#include "caf/expected.hpp"
#include "caf/expected.hpp"
#include "caf/
scoped_actor
.hpp"
#include "caf/
function_view
.hpp"
#include "caf/openssl/manager.hpp"
#include "caf/openssl/manager.hpp"
...
@@ -39,27 +39,18 @@ expected<strong_actor_ptr> remote_actor(actor_system& sys,
...
@@ -39,27 +39,18 @@ expected<strong_actor_ptr> remote_actor(actor_system& sys,
std
::
string
host
,
uint16_t
port
)
{
std
::
string
host
,
uint16_t
port
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
mpi
)
<<
CAF_ARG
(
host
)
<<
CAF_ARG
(
port
));
CAF_LOG_TRACE
(
CAF_ARG
(
mpi
)
<<
CAF_ARG
(
host
)
<<
CAF_ARG
(
port
));
expected
<
strong_actor_ptr
>
res
{
strong_actor_ptr
{
nullptr
}};
expected
<
strong_actor_ptr
>
res
{
strong_actor_ptr
{
nullptr
}};
scoped_actor
self
{
sys
};
auto
f
=
make_function_view
(
sys
.
openssl_manager
().
actor_handle
());
auto
mm
=
sys
.
openssl_manager
().
actor_handle
();
auto
x
=
f
(
connect_atom
::
value
,
std
::
move
(
host
),
port
);
CAF_ASSERT
(
mm
!=
nullptr
);
if
(
!
x
)
self
->
request
(
sys
.
openssl_manager
().
actor_handle
(),
infinite
,
return
std
::
move
(
x
.
error
());
connect_atom
::
value
,
std
::
move
(
host
),
port
)
auto
&
tup
=
*
x
;
.
receive
(
auto
&
ptr
=
get
<
1
>
(
tup
);
[
&
](
const
node_id
&
,
strong_actor_ptr
&
ptr
,
std
::
set
<
std
::
string
>&
found
)
{
if
(
!
ptr
)
if
(
ptr
)
{
return
sec
::
no_actor_published_at_port
;
if
(
sys
.
assignable
(
found
,
mpi
))
auto
&
found_mpi
=
get
<
2
>
(
tup
);
res
=
std
::
move
(
ptr
);
if
(
sys
.
assignable
(
found_mpi
,
mpi
))
else
return
std
::
move
(
ptr
);
res
=
sec
::
unexpected_actor_messaging_interface
;
return
sec
::
unexpected_actor_messaging_interface
;
}
else
{
res
=
sec
::
no_actor_published_at_port
;
}
},
[
&
](
error
&
err
)
{
res
=
std
::
move
(
err
);
}
);
return
res
;
}
}
}
// namespace openssl
}
// namespace openssl
...
...
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