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
d45dbf15
Commit
d45dbf15
authored
Sep 04, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add openssl::unpublish function
parent
8cb6b747
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
libcaf_openssl/caf/openssl/unpublish.hpp
libcaf_openssl/caf/openssl/unpublish.hpp
+53
-0
No files found.
libcaf_openssl/caf/openssl/unpublish.hpp
0 → 100644
View file @
d45dbf15
/******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright (C) 2011 - 2017 *
* Dominik Charousset <dominik.charousset (at) haw-hamburg.de> *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_OPENSSL_UNPUBLISH_HPP
#define CAF_OPENSSL_UNPUBLISH_HPP
#include <cstdint>
#include "caf/sec.hpp"
#include "caf/error.hpp"
#include "caf/expected.hpp"
#include "caf/actor_cast.hpp"
#include "caf/typed_actor.hpp"
#include "caf/function_view.hpp"
#include "caf/actor_control_block.hpp"
#include "caf/openssl/manager.hpp"
namespace
caf
{
namespace
openssl
{
/// Unpublishes `whom` by closing `port` or all assigned ports if `port == 0`.
/// @param whom Actor that should be unpublished at `port`.
/// @param port TCP port.
template
<
class
Handle
>
expected
<
void
>
unpublish
(
const
Handle
&
whom
,
uint16_t
port
=
0
)
{
if
(
!
whom
)
return
sec
::
invalid_argument
;
auto
&
sys
=
whom
.
home_system
();
auto
f
=
make_function_view
(
sys
.
openssl_manager
().
actor_handle
());
return
f
(
unpublish_atom
::
value
,
port
);
}
}
// namespace openssl
}
// namespace caf
#endif // CAF_OPENSSL_UNPUBLISH_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