diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/CHANGES | 4 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.cpp | 3 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/TcpAcceptor.cpp | 14 | ||||
-rw-r--r-- | cpp/src/IceSSL/AcceptorI.cpp | 13 |
5 files changed, 22 insertions, 14 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES index 25de77afa4b..9dc97a673e6 100644 --- a/cpp/CHANGES +++ b/cpp/CHANGES @@ -1,6 +1,10 @@ Changes since version 3.2.X (binary incompatible) ------------------------------------------------- +- Added a new property, Ice.TCP.Backlog, which can be used to configure + the backlog for TCP/IP sockets. The default is set to the value of + SOMAXCONN or 511 if SOMAXCONN is not defined. + - Changed the IceGrid node to be more conservative when removing a server directory. It's now only removed when the server is explicitly removed from a deployed application or if the directory 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 { |