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
c18a1e1a
Commit
c18a1e1a
authored
Oct 23, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use compile-time constants as defaults
parent
b0e93f0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
26 deletions
+3
-26
libcaf_net/CMakeLists.txt
libcaf_net/CMakeLists.txt
+0
-1
libcaf_net/caf/net/defaults.hpp
libcaf_net/caf/net/defaults.hpp
+3
-10
libcaf_net/src/defaults.cpp
libcaf_net/src/defaults.cpp
+0
-15
No files found.
libcaf_net/CMakeLists.txt
View file @
c18a1e1a
...
@@ -22,7 +22,6 @@ caf_incubator_add_component(
...
@@ -22,7 +22,6 @@ caf_incubator_add_component(
SOURCES
SOURCES
src/convert_ip_endpoint.cpp
src/convert_ip_endpoint.cpp
src/datagram_socket.cpp
src/datagram_socket.cpp
src/defaults.cpp
src/detail/rfc6455.cpp
src/detail/rfc6455.cpp
src/header.cpp
src/header.cpp
src/host.cpp
src/host.cpp
...
...
libcaf_net/caf/net/defaults.hpp
View file @
c18a1e1a
...
@@ -7,24 +7,17 @@
...
@@ -7,24 +7,17 @@
#include <cstddef>
#include <cstddef>
#include <cstdint>
#include <cstdint>
#include "caf/detail/net_export.hpp"
// -- hard-coded default values for various CAF options ------------------------
// -- hard-coded default values for various CAF options ------------------------
namespace
caf
::
defaults
::
middleman
{
namespace
caf
::
defaults
::
middleman
{
/// Maximum number of cached buffers for sending payloads.
/// Maximum number of cached buffers for sending payloads.
CAF_NET_EXPORT
extern
const
size_t
max_payload_buffers
;
constexpr
size_t
max_payload_buffers
=
100
;
/// Maximum number of cached buffers for sending headers.
/// Maximum number of cached buffers for sending headers.
CAF_NET_EXPORT
extern
const
size_t
max_header_buffers
;
constexpr
size_t
max_header_buffers
=
10
;
/// Port to listen on for tcp.
/// Port to listen on for tcp.
CAF_NET_EXPORT
extern
const
uint16_t
tcp_port
;
constexpr
uint16_t
tcp_port
=
0
;
/// Caps how much Bytes a stream transport pushes to its write buffer before
/// stopping to read from its message queue. Default TCP send buffer is 16kB (at
/// least on Linux).
constexpr
auto
stream_output_buf_cap
=
size_t
{
32768
};
}
// namespace caf::defaults::middleman
}
// namespace caf::defaults::middleman
libcaf_net/src/defaults.cpp
deleted
100644 → 0
View file @
b0e93f0e
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#include "caf/net/defaults.hpp"
namespace
caf
::
defaults
::
middleman
{
const
size_t
max_payload_buffers
=
100
;
const
size_t
max_header_buffers
=
10
;
const
uint16_t
tcp_port
=
0
;
}
// namespace caf::defaults::middleman
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