diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-03-03 13:05:19 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-03-03 13:05:19 -0330 |
commit | 2fe064b44b5d56c87b65e889bfe898ce2ee737fc (patch) | |
tree | d7cfb49f989a5fffa61791859b260f4048be4efe /cpp/src/Ice/Instance.h | |
parent | Fixed (ICE-5835) - Scope of operation parameters (diff) | |
download | ice-2fe064b44b5d56c87b65e889bfe898ce2ee737fc.tar.bz2 ice-2fe064b44b5d56c87b65e889bfe898ce2ee737fc.tar.xz ice-2fe064b44b5d56c87b65e889bfe898ce2ee737fc.zip |
ICE-6116 reduce verbose warnings about socket buffer size
Diffstat (limited to 'cpp/src/Ice/Instance.h')
-rw-r--r-- | cpp/src/Ice/Instance.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h index 176e5d731fc..a6e9182b136 100644 --- a/cpp/src/Ice/Instance.h +++ b/cpp/src/Ice/Instance.h @@ -63,6 +63,24 @@ typedef IceUtil::Handle<MetricsAdminI> MetricsAdminIPtr; class RequestHandlerFactory; typedef IceUtil::Handle<RequestHandlerFactory> RequestHandlerFactoryPtr; +// +// Structure to track warnings for attempts to set socket buffer sizes +// +struct BufSizeWarnInfo +{ + // Whether send size warning has been emitted + bool sndWarn; + + // The send size for which the warning wwas emitted + int sndSize; + + // Whether receive size warning has been emitted + bool rcvWarn; + + // The receive size for which the warning wwas emitted + int rcvSize; +}; + class Instance : public IceUtil::Shared, public IceUtil::Monitor<IceUtil::RecMutex> { public: @@ -118,7 +136,11 @@ public: IceUtil::StringConverterPtr getStringConverter() const { return _stringConverter; } IceUtil::WstringConverterPtr getWstringConverter() const { return _wstringConverter; } - + + BufSizeWarnInfo getBufSizeWarn(Ice::Short type); + void setSndBufSizeWarn(Ice::Short type, int size); + void setRcvBufSizeWarn(Ice::Short type, int size); + private: Instance(const Ice::CommunicatorPtr&, const Ice::InitializationData&); @@ -134,6 +156,8 @@ private: void addAllAdminFacets(); void setServerProcessProxy(const Ice::ObjectAdapterPtr&, const Ice::Identity&); + BufSizeWarnInfo getBufSizeWarnInternal(Ice::Short type); + enum State { StateActive, @@ -177,6 +201,8 @@ private: Ice::Identity _adminIdentity; std::set<std::string> _adminFacetFilter; IceInternal::MetricsAdminIPtr _metricsAdmin; + std::map<Ice::Short, BufSizeWarnInfo> _setBufSizeWarn; + IceUtil::Mutex _setBufSizeWarnMutex; }; class ProcessI : public Ice::Process |