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
0c6234d1
Commit
0c6234d1
authored
Jul 27, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix config parameter names
parent
4570e807
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
16 deletions
+25
-16
libcaf_net/caf/net/basp/application.hpp
libcaf_net/caf/net/basp/application.hpp
+1
-1
libcaf_net/caf/net/transport_base.hpp
libcaf_net/caf/net/transport_base.hpp
+3
-3
libcaf_net/src/basp/application.cpp
libcaf_net/src/basp/application.cpp
+2
-2
libcaf_net/src/net/backend/tcp.cpp
libcaf_net/src/net/backend/tcp.cpp
+3
-2
libcaf_net/src/net/middleman.cpp
libcaf_net/src/net/middleman.cpp
+13
-5
libcaf_net/test/net/backend/tcp.cpp
libcaf_net/test/net/backend/tcp.cpp
+1
-1
libcaf_net/test/net/basp/ping_pong.cpp
libcaf_net/test/net/basp/ping_pong.cpp
+1
-1
libcaf_net/test/stream_application.cpp
libcaf_net/test/stream_application.cpp
+1
-1
No files found.
libcaf_net/caf/net/basp/application.hpp
View file @
0c6234d1
...
...
@@ -88,7 +88,7 @@ public:
manager_
=
&
parent
.
manager
();
size_t
workers
;
if
(
auto
workers_cfg
=
get_if
<
size_t
>
(
&
system_
->
config
(),
"middleman.workers"
))
"
caf.
middleman.workers"
))
workers
=
*
workers_cfg
;
else
workers
=
std
::
min
(
3u
,
std
::
thread
::
hardware_concurrency
()
/
4u
)
+
1
;
...
...
libcaf_net/caf/net/transport_base.hpp
View file @
0c6234d1
...
...
@@ -101,12 +101,12 @@ public:
manager_
=
&
parent
;
auto
&
cfg
=
system
().
config
();
max_consecutive_reads_
=
get_or
(
this
->
system
().
config
(),
"middleman.max-consecutive-reads"
,
"
caf.
middleman.max-consecutive-reads"
,
defaults
::
middleman
::
max_consecutive_reads
);
auto
max_header_bufs
=
get_or
(
cfg
,
"middleman.max-header-buffers"
,
auto
max_header_bufs
=
get_or
(
cfg
,
"
caf.
middleman.max-header-buffers"
,
defaults
::
middleman
::
max_header_buffers
);
header_bufs_
.
reserve
(
max_header_bufs
);
auto
max_payload_bufs
=
get_or
(
cfg
,
"middleman.max-payload-buffers"
,
auto
max_payload_bufs
=
get_or
(
cfg
,
"
caf.
middleman.max-payload-buffers"
,
defaults
::
middleman
::
max_payload_buffers
);
payload_bufs_
.
reserve
(
max_payload_bufs
);
if
(
auto
err
=
next_layer_
.
init
(
*
this
))
...
...
libcaf_net/src/basp/application.cpp
View file @
0c6234d1
...
...
@@ -222,7 +222,7 @@ error application::handle_handshake(packet_writer&, header hdr,
return
err
;
if
(
!
peer_id
||
app_ids
.
empty
())
return
ec
::
invalid_handshake
;
auto
ids
=
get_or
(
system
().
config
(),
"middleman.app-identifiers"
,
auto
ids
=
get_or
(
system
().
config
(),
"
caf.
middleman.app-identifiers"
,
basp
::
application
::
default_app_ids
());
auto
predicate
=
[
=
](
const
std
::
string
&
x
)
{
return
std
::
find
(
ids
.
begin
(),
ids
.
end
(),
x
)
!=
ids
.
end
();
...
...
@@ -381,7 +381,7 @@ error application::handle_down_message(packet_writer&, header received_hdr,
error
application
::
generate_handshake
(
byte_buffer
&
buf
)
{
binary_serializer
sink
{
&
executor_
,
buf
};
return
sink
(
system
().
node
(),
get_or
(
system
().
config
(),
"middleman.app-identifiers"
,
get_or
(
system
().
config
(),
"
caf.
middleman.app-identifiers"
,
application
::
default_app_ids
()));
}
...
...
libcaf_net/src/net/backend/tcp.cpp
View file @
0c6234d1
...
...
@@ -47,8 +47,9 @@ tcp::~tcp() {
}
error
tcp
::
init
()
{
uint16_t
conf_port
=
get_or
<
uint16_t
>
(
mm_
.
system
().
config
(),
"middleman.tcp-port"
,
defaults
::
middleman
::
tcp_port
);
uint16_t
conf_port
=
get_or
<
uint16_t
>
(
mm_
.
system
().
config
(),
"caf.middleman.tcp-port"
,
defaults
::
middleman
::
tcp_port
);
ip_endpoint
ep
;
auto
local_address
=
std
::
string
(
"[::]:"
)
+
std
::
to_string
(
conf_port
);
if
(
auto
err
=
detail
::
parse
(
local_address
,
ep
))
...
...
libcaf_net/src/net/middleman.cpp
View file @
0c6234d1
...
...
@@ -46,7 +46,7 @@ middleman::~middleman() {
}
void
middleman
::
start
()
{
if
(
!
get_or
(
config
(),
"middleman.manual-multiplexing"
,
false
))
{
if
(
!
get_or
(
config
(),
"
caf.
middleman.manual-multiplexing"
,
false
))
{
auto
mpx
=
mpx_
;
auto
sys_ptr
=
&
system
();
mpx_thread_
=
std
::
thread
{[
mpx
,
sys_ptr
]
{
...
...
@@ -75,11 +75,11 @@ void middleman::init(actor_system_config& cfg) {
CAF_LOG_ERROR
(
"mgr->init() failed: "
<<
err
);
CAF_RAISE_ERROR
(
"mpx->init() failed"
);
}
if
(
auto
node_uri
=
get_if
<
uri
>
(
&
cfg
,
"middleman.this-node"
))
{
if
(
auto
node_uri
=
get_if
<
uri
>
(
&
cfg
,
"
caf.
middleman.this-node"
))
{
auto
this_node
=
make_node_id
(
std
::
move
(
*
node_uri
));
sys_
.
node_
.
swap
(
this_node
);
}
else
{
CAF_RAISE_ERROR
(
"no valid entry for middleman.this-node found"
);
CAF_RAISE_ERROR
(
"no valid entry for
caf.
middleman.this-node found"
);
}
for
(
auto
&
backend
:
backends_
)
if
(
auto
err
=
backend
->
init
())
{
...
...
@@ -96,8 +96,16 @@ void* middleman::subtype_ptr() {
return
this
;
}
void
middleman
::
add_module_options
(
actor_system_config
&
)
{
// nop
void
middleman
::
add_module_options
(
actor_system_config
&
cfg
)
{
config_option_adder
{
cfg
.
custom_options
(),
"caf.middleman"
}
.
add
<
std
::
vector
<
std
::
string
>>
(
"app-identifiers"
,
"valid application identifiers of this node"
)
.
add
<
uri
>
(
"this-node"
,
"locator of this CAF node"
)
.
add
<
size_t
>
(
"max-consecutive-reads"
,
"max. number of consecutive reads per broker"
)
.
add
<
bool
>
(
"manual-multiplexing"
,
"disables background activity of the multiplexer"
)
.
add
<
size_t
>
(
"workers"
,
"number of deserialization workers"
);
}
expected
<
endpoint_manager_ptr
>
middleman
::
connect
(
const
uri
&
locator
)
{
...
...
libcaf_net/test/net/backend/tcp.cpp
View file @
0c6234d1
...
...
@@ -61,7 +61,7 @@ template <class Node>
struct
config
:
actor_system_config
{
config
()
{
Node
this_node
;
put
(
content
,
"middleman.this-node"
,
this_node
());
put
(
content
,
"
caf.
middleman.this-node"
,
this_node
());
load
<
middleman
,
backend
::
tcp
>
();
}
};
...
...
libcaf_net/test/net/basp/ping_pong.cpp
View file @
0c6234d1
...
...
@@ -47,7 +47,7 @@ template <class Node>
struct
config
:
actor_system_config
{
config
()
{
Node
this_node
;
put
(
content
,
"middleman.this-node"
,
this_node
());
put
(
content
,
"
caf.
middleman.this-node"
,
this_node
());
load
<
middleman
,
backend
::
test
>
();
}
};
...
...
libcaf_net/test/stream_application.cpp
View file @
0c6234d1
...
...
@@ -56,7 +56,7 @@ size_t fetch_size(variant<size_t, sec> x) {
struct
config
:
actor_system_config
{
config
()
{
put
(
content
,
"middleman.this-node"
,
unbox
(
make_uri
(
"test:earth"
)));
put
(
content
,
"
caf.
middleman.this-node"
,
unbox
(
make_uri
(
"test:earth"
)));
load
<
middleman
,
backend
::
test
>
();
}
};
...
...
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