diff options
author | Othmar Gsenger <otti@anytun.org> | 2007-12-13 16:22:02 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2007-12-13 16:22:02 +0000 |
commit | f2474da8648b95340456a2695fc2c90e043dabec (patch) | |
tree | 08e29164bde8fb4a98b2720f3dcb75732905ed87 /connectionList.h | |
parent | added mux_type (diff) |
added Synccommand / now connection updates work / sync is multi connection capable
Diffstat (limited to 'connectionList.h')
-rw-r--r-- | connectionList.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/connectionList.h b/connectionList.h index e12ccff..670f077 100644 --- a/connectionList.h +++ b/connectionList.h @@ -38,21 +38,23 @@ #include "datatypes.h" #include "connectionParam.h" #include "networkAddress.h" +typedef std::map<u_int16_t, ConnectionParam> ConnectionMap; class ConnectionList { public: ConnectionList(); ~ConnectionList(); - void addConnection(ConnectionParam &conn, const std::string &name); - ConnectionParam & getConnection(); + void addConnection(ConnectionParam &conn, u_int16_t mux); + const ConnectionMap::iterator getConnection(u_int16_t mux); + const ConnectionMap::iterator getEnd(); + ConnectionParam & getOrNewConnection(u_int16_t mux); bool empty(); void clear(); private: ConnectionList(const ConnectionList &s); void operator=(const ConnectionList &s); - typedef std::map<std::string, ConnectionParam> ConnectionMap; ConnectionMap connections_; Mutex mutex_; }; |