summaryrefslogtreecommitdiff
path: root/cpp/src
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
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')
-rw-r--r--cpp/src/Ice/PropertyNames.cpp3
-rw-r--r--cpp/src/Ice/PropertyNames.h2
-rw-r--r--cpp/src/Ice/TcpAcceptor.cpp14
-rw-r--r--cpp/src/IceSSL/AcceptorI.cpp13
4 files changed, 18 insertions, 14 deletions
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp
index 205452ece8c..fd83fc542b9 100644
--- a/cpp/src/Ice/PropertyNames.cpp
+++ b/cpp/src/Ice/PropertyNames.cpp
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Feb 18 10:11:33 2008
+// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Feb 27 12:48:24 2008
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -112,6 +112,7 @@ const IceInternal::Property IcePropsData[] =
IceInternal::Property("Ice.Trace.Slicing", false, 0),
IceInternal::Property("Ice.UDP.RcvSize", false, 0),
IceInternal::Property("Ice.UDP.SndSize", false, 0),
+ IceInternal::Property("Ice.TCP.Backlog", false, 0),
IceInternal::Property("Ice.TCP.RcvSize", false, 0),
IceInternal::Property("Ice.TCP.SndSize", false, 0),
IceInternal::Property("Ice.UseSyslog", false, 0),
diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h
index ba5ac9e5d89..0455602fa97 100644
--- a/cpp/src/Ice/PropertyNames.h
+++ b/cpp/src/Ice/PropertyNames.h
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Feb 18 10:11:33 2008
+// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Feb 27 12:48:24 2008
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
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
{
diff --git a/cpp/src/IceSSL/AcceptorI.cpp b/cpp/src/IceSSL/AcceptorI.cpp
index 314705162c6..91aca0169b9 100644
--- a/cpp/src/IceSSL/AcceptorI.cpp
+++ b/cpp/src/IceSSL/AcceptorI.cpp
@@ -17,6 +17,7 @@
#include <Ice/LocalException.h>
#include <Ice/LoggerUtil.h>
#include <Ice/Network.h>
+#include <Ice/Properties.h>
using namespace std;
using namespace Ice;
@@ -142,13 +143,13 @@ IceSSL::AcceptorI::effectivePort() const
IceSSL::AcceptorI::AcceptorI(const InstancePtr& instance, const string& adapterName, const string& host, int port) :
_instance(instance),
_adapterName(adapterName),
- _logger(instance->communicator()->getLogger()),
- _backlog(0)
+ _logger(instance->communicator()->getLogger())
{
- if(_backlog <= 0)
- {
- _backlog = 5;
- }
+#ifdef SOMAXCONN
+ _backlog = instance->communicator()->getProperties()->getPropertyAsIntWithDefault("Ice.TCP.Backlog", SOMAXCONN);
+#else
+ _backlog = instance->communicator()->getProperties()->getPropertyAsIntWithDefault("Ice.TCP.Backlog", 511);
+#endif
try
{