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
5f5e411c
Commit
5f5e411c
authored
Aug 10, 2023
by
Samir Halilcevic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused vars, types and user input
parent
c2a60ac7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
libcaf_net/tests/drivers/autobahn.cpp
libcaf_net/tests/drivers/autobahn.cpp
+6
-7
No files found.
libcaf_net/tests/drivers/autobahn.cpp
View file @
5f5e411c
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
#include "caf/actor_system_config.hpp"
#include "caf/actor_system_config.hpp"
#include "caf/caf_main.hpp"
#include "caf/caf_main.hpp"
#include <cstdio>
#include <iostream>
#include <iostream>
#include <utility>
#include <utility>
...
@@ -30,6 +29,9 @@ struct config : caf::actor_system_config {
...
@@ -30,6 +29,9 @@ struct config : caf::actor_system_config {
opt_group
{
custom_options_
,
"global"
}
//
opt_group
{
custom_options_
,
"global"
}
//
.
add
<
uint16_t
>
(
"port,p"
,
"port to listen for incoming connections"
)
.
add
<
uint16_t
>
(
"port,p"
,
"port to listen for incoming connections"
)
.
add
<
size_t
>
(
"max-connections,m"
,
"limit for concurrent clients"
);
.
add
<
size_t
>
(
"max-connections,m"
,
"limit for concurrent clients"
);
opt_group
{
custom_options_
,
"tls"
}
//
.
add
<
std
::
string
>
(
"key-file,k"
,
"path to the private key file"
)
.
add
<
std
::
string
>
(
"cert-file,c"
,
"path to the certificate file"
);
}
}
};
};
...
@@ -84,7 +86,6 @@ public:
...
@@ -84,7 +86,6 @@ public:
int
caf_main
(
caf
::
actor_system
&
sys
,
const
config
&
cfg
)
{
int
caf_main
(
caf
::
actor_system
&
sys
,
const
config
&
cfg
)
{
// Read the configuration.
// Read the configuration.
auto
interval
=
caf
::
get_or
(
cfg
,
"interval"
,
caf
::
timespan
{
1s
});
auto
port
=
caf
::
get_or
(
cfg
,
"port"
,
default_port
);
auto
port
=
caf
::
get_or
(
cfg
,
"port"
,
default_port
);
auto
pem
=
ssl
::
format
::
pem
;
auto
pem
=
ssl
::
format
::
pem
;
auto
key_file
=
caf
::
get_as
<
std
::
string
>
(
cfg
,
"tls.key-file"
);
auto
key_file
=
caf
::
get_as
<
std
::
string
>
(
cfg
,
"tls.key-file"
);
...
@@ -96,7 +97,6 @@ int caf_main(caf::actor_system& sys, const config& cfg) {
...
@@ -96,7 +97,6 @@ int caf_main(caf::actor_system& sys, const config& cfg) {
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
}
}
// Open up a TCP port for incoming connections and start the server.
// Open up a TCP port for incoming connections and start the server.
using
trait
=
ws
::
default_trait
;
auto
server
auto
server
=
ws
::
with
(
sys
)
=
ws
::
with
(
sys
)
// Optionally enable TLS.
// Optionally enable TLS.
...
@@ -121,10 +121,9 @@ int caf_main(caf::actor_system& sys, const config& cfg) {
...
@@ -121,10 +121,9 @@ int caf_main(caf::actor_system& sys, const config& cfg) {
<<
to_string
(
server
.
error
())
<<
'\n'
;
<<
to_string
(
server
.
error
())
<<
'\n'
;
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
}
}
// Run until the user stops the server by pressing enter.
while
(
server
->
valid
())
{
std
::
cout
<<
"*** running on port "
<<
port
<<
'\n'
std
::
this_thread
::
sleep_for
(
1s
);
<<
"*** press [enter] to quit"
<<
std
::
endl
;
}
getchar
();
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
}
...
...
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