Skip to content

Commit

Permalink
increased default value of socketOptionsListenBacklog
Browse files Browse the repository at this point in the history
  • Loading branch information
danovaro committed Nov 6, 2024
1 parent 9cd9faf commit c85ca6c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/eckit/net/SocketOptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@
namespace eckit::net {

static void init(SocketOptions& opts) {
static std::string bindAddr = Resource<std::string>("localBindingAddress", ""); /* "127.0.0.1" */

opts.bindAddress(bindAddr);

static int ListenBacklog = eckit::Resource<int>("socketOptionsListenBacklog", 5);

opts.listenBacklog(ListenBacklog);
static std::string bindAddr = Resource<std::string>("localBindingAddress", ""); /* "127.0.0.1" */
static int ListenBacklog = eckit::Resource<int>("socketOptionsListenBacklog", 128);

static bool reusePort = eckit::Resource<bool>("socketOptionsReusePort", false);
static bool reuseAddr = eckit::Resource<bool>("socketOptionsReuseAddr", false);
Expand All @@ -34,6 +30,8 @@ static void init(SocketOptions& opts) {
static int receiveBufferSize = eckit::Resource<int>("socketOptionsReceiveBufferSize", 0);
static int sendBufferSize = eckit::Resource<int>("socketOptionsSendBufferSize", 0);

opts.bindAddress(bindAddr);
opts.listenBacklog(ListenBacklog);
opts.reusePort(reusePort);
opts.reuseAddr(reuseAddr);
opts.noLinger(noLinger);
Expand Down

0 comments on commit c85ca6c

Please sign in to comment.