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
af7d77b6
Commit
af7d77b6
authored
Jul 10, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add reuse flag to publish_local_groups, close #526
parent
dfea8b59
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
libcaf_io/caf/io/middleman.hpp
libcaf_io/caf/io/middleman.hpp
+2
-1
libcaf_io/src/middleman.cpp
libcaf_io/src/middleman.cpp
+2
-2
No files found.
libcaf_io/caf/io/middleman.hpp
View file @
af7d77b6
...
@@ -82,7 +82,8 @@ public:
...
@@ -82,7 +82,8 @@ public:
/// @returns The actual port the OS uses after `bind()`. If `port == 0`
/// @returns The actual port the OS uses after `bind()`. If `port == 0`
/// the OS chooses a random high-level port.
/// the OS chooses a random high-level port.
expected
<
uint16_t
>
publish_local_groups
(
uint16_t
port
,
expected
<
uint16_t
>
publish_local_groups
(
uint16_t
port
,
const
char
*
in
=
nullptr
);
const
char
*
in
=
nullptr
,
bool
reuse
=
false
);
/// Unpublishes `whom` by closing `port` or all assigned ports if `port == 0`.
/// Unpublishes `whom` by closing `port` or all assigned ports if `port == 0`.
/// @param whom Actor that should be unpublished at `port`.
/// @param whom Actor that should be unpublished at `port`.
...
...
libcaf_io/src/middleman.cpp
View file @
af7d77b6
...
@@ -153,7 +153,7 @@ expected<uint16_t> middleman::publish(const strong_actor_ptr& whom,
...
@@ -153,7 +153,7 @@ expected<uint16_t> middleman::publish(const strong_actor_ptr& whom,
}
}
expected
<
uint16_t
>
middleman
::
publish_local_groups
(
uint16_t
port
,
expected
<
uint16_t
>
middleman
::
publish_local_groups
(
uint16_t
port
,
const
char
*
in
)
{
const
char
*
in
,
bool
reuse
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
port
)
<<
CAF_ARG
(
in
));
CAF_LOG_TRACE
(
CAF_ARG
(
port
)
<<
CAF_ARG
(
in
));
auto
group_nameserver
=
[](
event_based_actor
*
self
)
->
behavior
{
auto
group_nameserver
=
[](
event_based_actor
*
self
)
->
behavior
{
return
{
return
{
...
@@ -163,7 +163,7 @@ expected<uint16_t> middleman::publish_local_groups(uint16_t port,
...
@@ -163,7 +163,7 @@ expected<uint16_t> middleman::publish_local_groups(uint16_t port,
};
};
};
};
auto
gn
=
system
().
spawn
<
hidden
>
(
group_nameserver
);
auto
gn
=
system
().
spawn
<
hidden
>
(
group_nameserver
);
auto
result
=
publish
(
gn
,
port
,
in
);
auto
result
=
publish
(
gn
,
port
,
in
,
reuse
);
// link gn to our manager
// link gn to our manager
if
(
result
)
if
(
result
)
manager_
->
add_link
(
actor_cast
<
abstract_actor
*>
(
gn
));
manager_
->
add_link
(
actor_cast
<
abstract_actor
*>
(
gn
));
...
...
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