mirror of
https://github.com/pocoproject/poco.git
synced 2025-07-01 08:23:29 +02:00
Use Int64 for TcpServerDispatcher::totalConnections(), to prevent overflow
This commit is contained in:
parent
e4aaeacea8
commit
63bed8c8d3
@ -175,7 +175,7 @@ public:
|
|||||||
int maxThreads() const;
|
int maxThreads() const;
|
||||||
/// Returns the maximum number of threads available.
|
/// Returns the maximum number of threads available.
|
||||||
|
|
||||||
int totalConnections() const;
|
Int64 totalConnections() const;
|
||||||
/// Returns the total number of handled connections.
|
/// Returns the total number of handled connections.
|
||||||
|
|
||||||
int currentConnections() const;
|
int currentConnections() const;
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
int maxThreads() const;
|
int maxThreads() const;
|
||||||
/// Returns the maximum number of threads available.
|
/// Returns the maximum number of threads available.
|
||||||
|
|
||||||
int totalConnections() const;
|
Int64 totalConnections() const;
|
||||||
/// Returns the total number of handled connections.
|
/// Returns the total number of handled connections.
|
||||||
|
|
||||||
int currentConnections() const;
|
int currentConnections() const;
|
||||||
@ -103,12 +103,12 @@ private:
|
|||||||
|
|
||||||
std::atomic<int> _rc;
|
std::atomic<int> _rc;
|
||||||
TCPServerParams::Ptr _pParams;
|
TCPServerParams::Ptr _pParams;
|
||||||
std::atomic<int> _currentThreads;
|
std::atomic<int> _currentThreads;
|
||||||
std::atomic<int> _totalConnections;
|
std::atomic<Int64> _totalConnections;
|
||||||
std::atomic<int> _currentConnections;
|
std::atomic<int> _currentConnections;
|
||||||
std::atomic<int> _maxConcurrentConnections;
|
std::atomic<int> _maxConcurrentConnections;
|
||||||
std::atomic<int> _refusedConnections;
|
std::atomic<int> _refusedConnections;
|
||||||
std::atomic<bool> _stopped;
|
std::atomic<bool> _stopped;
|
||||||
Poco::NotificationQueue _queue;
|
Poco::NotificationQueue _queue;
|
||||||
TCPServerConnectionFactory::Ptr _pConnectionFactory;
|
TCPServerConnectionFactory::Ptr _pConnectionFactory;
|
||||||
Poco::ThreadPool& _threadPool;
|
Poco::ThreadPool& _threadPool;
|
||||||
|
@ -185,7 +185,7 @@ int TCPServer::maxThreads() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TCPServer::totalConnections() const
|
Int64 TCPServer::totalConnections() const
|
||||||
{
|
{
|
||||||
return _pDispatcher->totalConnections();
|
return _pDispatcher->totalConnections();
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ int TCPServerDispatcher::maxThreads() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TCPServerDispatcher::totalConnections() const
|
Int64 TCPServerDispatcher::totalConnections() const
|
||||||
{
|
{
|
||||||
return _totalConnections;
|
return _totalConnections;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user