11//
22// TCPServerDispatcher.h
33//
4- // $Id: //poco/svn /Net/include/Poco/Net/TCPServerDispatcher.h#2 $
4+ // $Id: //poco/Main /Net/include/Poco/Net/TCPServerDispatcher.h#3 $
55//
66// Library: Net
77// Package: TCPServer
4242
4343#include " Poco/Net/Net.h"
4444#include " Poco/Net/StreamSocket.h"
45+ #include " Poco/Net/TCPServerConnectionFactory.h"
46+ #include " Poco/Net/TCPServerParams.h"
4547#include " Poco/Runnable.h"
4648#include " Poco/NotificationQueue.h"
4749#include " Poco/ThreadPool.h"
@@ -52,16 +54,12 @@ namespace Poco {
5254namespace Net {
5355
5456
55- class TCPServerParams ;
56- class TCPServerConnectionFactory ;
57-
58-
5957class Net_API TCPServerDispatcher: public Poco::Runnable
6058 // / A helper class for TCPServer that dispatches
6159 // / connections to server connection threads.
6260{
6361public:
64- TCPServerDispatcher (TCPServerConnectionFactory* pFactory, Poco::ThreadPool& threadPool, TCPServerParams* pParams);
62+ TCPServerDispatcher (TCPServerConnectionFactory::Ptr pFactory, Poco::ThreadPool& threadPool, TCPServerParams::Ptr pParams);
6563 // / Creates the TCPServerDispatcher.
6664 // /
6765 // / The dispatcher takes ownership of the TCPServerParams object.
@@ -122,17 +120,17 @@ class Net_API TCPServerDispatcher: public Poco::Runnable
122120 TCPServerDispatcher& operator = (const TCPServerDispatcher&);
123121
124122 int _rc;
125- TCPServerParams* _pParams;
123+ TCPServerParams::Ptr _pParams;
126124 int _currentThreads;
127125 int _totalConnections;
128126 int _currentConnections;
129127 int _maxConcurrentConnections;
130128 int _refusedConnections;
131129 bool _stopped;
132- Poco::NotificationQueue _queue;
133- TCPServerConnectionFactory* _pConnectionFactory;
134- Poco::ThreadPool& _threadPool;
135- mutable Poco::FastMutex _mutex;
130+ Poco::NotificationQueue _queue;
131+ TCPServerConnectionFactory::Ptr _pConnectionFactory;
132+ Poco::ThreadPool& _threadPool;
133+ mutable Poco::FastMutex _mutex;
136134};
137135
138136
0 commit comments