summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/TcpAcceptor.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-02-27 13:54:15 -0330
committerDwayne Boone <dwayne@zeroc.com>2008-02-27 13:54:15 -0330
commitd3b63c15cb676ec988218345cdad73767b9db21d (patch)
tree5dd7a1a22297c4049d2ccd398c90b59583f81085 /cpp/src/Ice/TcpAcceptor.cpp
parentMerge branch 'master' of ssh://cvs.wpb.zeroc.com/home/git/ice (diff)
downloadice-d3b63c15cb676ec988218345cdad73767b9db21d.tar.bz2
ice-d3b63c15cb676ec988218345cdad73767b9db21d.tar.xz
ice-d3b63c15cb676ec988218345cdad73767b9db21d.zip
Bug 2729 - Added Ice.TCP.Backlog property
Diffstat (limited to 'cpp/src/Ice/TcpAcceptor.cpp')
-rw-r--r--cpp/src/Ice/TcpAcceptor.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/cpp/src/Ice/TcpAcceptor.cpp b/cpp/src/Ice/TcpAcceptor.cpp
index 70fb8211d3b..d30063f6e81 100644
--- a/cpp/src/Ice/TcpAcceptor.cpp
+++ b/cpp/src/Ice/TcpAcceptor.cpp
@@ -14,6 +14,7 @@
#include <Ice/LoggerUtil.h>
#include <Ice/Network.h>
#include <Ice/Exception.h>
+#include <Ice/Properties.h>
using namespace std;
using namespace Ice;
@@ -99,13 +100,14 @@ IceInternal::TcpAcceptor::effectivePort() const
IceInternal::TcpAcceptor::TcpAcceptor(const InstancePtr& instance, const string& host, int port) :
_instance(instance),
_traceLevels(instance->traceLevels()),
- _logger(instance->initializationData().logger),
- _backlog(0)
+ _logger(instance->initializationData().logger)
{
- if(_backlog <= 0)
- {
- _backlog = 5;
- }
+#ifdef SOMAXCONN
+ _backlog = instance->initializationData().properties->getPropertyAsIntWithDefault("Ice.TCP.Backlog", SOMAXCONN);
+#else
+ _backlog = instance->initializationData()->properties.getPropertyAsIntWithDefault("Ice.TCP.Backlog", 511);
+#endif
+ cout << "backlog = " << _backlog << endl;
try
{