diff options
Diffstat (limited to 'src/Server/ConnectionManager.h')
-rw-r--r-- | src/Server/ConnectionManager.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Server/ConnectionManager.h b/src/Server/ConnectionManager.h index 62ecc37..691d51f 100644 --- a/src/Server/ConnectionManager.h +++ b/src/Server/ConnectionManager.h @@ -23,6 +23,7 @@ #include <list> #include <vector> #include <map> +#include <set> #include <Common/Configurable.h> #include <Common/HostInfo.h> @@ -55,10 +56,10 @@ class ConnectionManager : public Common::Configurable, public Common::Initializa Common::HostInfo *hostInfo; protected: - virtual void send(const Net::Packet &packet); + virtual bool send(const Net::Packet &packet); public: - Connection(Net::ServerConnection *connection0, ConnectionType type0); + Connection(Net::ServerConnection *connection0); virtual ~Connection(); bool isConnected() const; @@ -91,7 +92,7 @@ class ConnectionManager : public Common::Configurable, public Common::Initializa std::vector<Net::IPAddress> listenerAddresses; std::list<Net::Listener*> listeners; - std::list<Connection*> connections; + std::set<Connection*> connections; std::map<std::string,Common::HostInfo> daemonInfo; @@ -103,6 +104,9 @@ class ConnectionManager : public Common::Configurable, public Common::Initializa ConnectionManager() {} + void newConnectionHandler(Net::ServerConnection *con); + void disconnectHandler(Connection *con); + protected: virtual bool handleConfigEntry(const Common::ConfigEntry &entry, bool handled); virtual void configFinished(); @@ -115,8 +119,6 @@ class ConnectionManager : public Common::Configurable, public Common::Initializa return &connectionManager; } - void run(); - Common::Connection* getDaemonConnection(const std::string &name) const throw (Net::Exception&); std::string getDaemonName(const Common::Connection *con) const throw (Net::Exception&); |