Changeset 707
- Timestamp:
- 12/01/11 15:05:28 (6 months ago)
- Location:
- trunk/sources/thelib
- Files:
-
- 10 edited
-
include/netio/epoll/iohandlermanager.h (modified) (1 diff)
-
include/netio/fdstats.h (modified) (1 diff)
-
include/netio/kqueue/iohandlermanager.h (modified) (1 diff)
-
include/netio/select/iohandlermanager.h (modified) (1 diff)
-
include/protocols/protocolmanager.h (modified) (2 diffs)
-
src/netio/epoll/iohandlermanager.cpp (modified) (1 diff)
-
src/netio/fdstats.cpp (modified) (1 diff)
-
src/netio/kqueue/iohandlermanager.cpp (modified) (1 diff)
-
src/netio/select/iohandlermanager.cpp (modified) (1 diff)
-
src/protocols/protocolmanager.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/thelib/include/netio/epoll/iohandlermanager.h
r706 r707 46 46 static map<uint32_t, IOHandler *> & GetActiveHandlers(); 47 47 static map<uint32_t, IOHandler *> & GetDeadHandlers(); 48 static FdStats &GetStats(); 48 49 static void Initialize(); 49 50 static void Start(); -
trunk/sources/thelib/include/netio/fdstats.h
r706 r707 60 60 int64_t Total(); 61 61 62 BaseFdStats &GetManagedTcp(); 63 BaseFdStats &GetManagedTcpAcceptors(); 64 BaseFdStats &GetManagedTcpConnectors(); 65 BaseFdStats &GetManagedUdp(); 66 BaseFdStats &GetManagedNonTcpUdp(); 67 BaseFdStats &GetRawUdp(); 68 62 69 void RegisterManaged(IOHandlerType type); 63 70 void UnRegisterManaged(IOHandlerType type); -
trunk/sources/thelib/include/netio/kqueue/iohandlermanager.h
r706 r707 56 56 static map<uint32_t, IOHandler *> & GetActiveHandlers(); 57 57 static map<uint32_t, IOHandler *> & GetDeadHandlers(); 58 static FdStats &GetStats(); 58 59 static void Initialize(); 59 60 static void Start(); -
trunk/sources/thelib/include/netio/select/iohandlermanager.h
r706 r707 45 45 static map<uint32_t, IOHandler *> & GetDeadHandlers(); 46 46 47 static FdStats &GetStats(); 47 48 /*! 48 49 @brief Initializes the handler manager. -
trunk/sources/thelib/include/protocols/protocolmanager.h
r241 r707 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 69 69 */ 70 70 static map<uint32_t, BaseProtocol *> GetActiveProtocols(); 71 72 /*! 73 @brief Extracts only the protocols which are tied to the network layer 74 */ 75 static void GetNetworkedProtocols(map<uint32_t, BaseProtocol *> &result); 71 76 }; 72 77 -
trunk/sources/thelib/src/netio/epoll/iohandlermanager.cpp
r706 r707 43 43 } 44 44 45 FdStats &IOHandlerManager::GetStats() { 46 return _fdStats; 47 } 48 45 49 void IOHandlerManager::Initialize() { 46 50 _fdStats.Reset(); -
trunk/sources/thelib/src/netio/fdstats.cpp
r706 r707 117 117 } 118 118 119 BaseFdStats &FdStats::GetManagedTcp() { 120 return _managedTcp; 121 } 122 123 BaseFdStats &FdStats::GetManagedTcpAcceptors() { 124 return _managedTcpAcceptors; 125 } 126 127 BaseFdStats &FdStats::GetManagedTcpConnectors() { 128 return _managedTcpConnectors; 129 } 130 131 BaseFdStats &FdStats::GetManagedUdp() { 132 return _managedUdp; 133 } 134 135 BaseFdStats &FdStats::GetManagedNonTcpUdp() { 136 return _managedNonTcpUdp; 137 } 138 139 BaseFdStats &FdStats::GetRawUdp() { 140 return _rawUdp; 141 } 142 119 143 void FdStats::RegisterManaged(IOHandlerType type) { 120 144 AccountManaged(type, true); -
trunk/sources/thelib/src/netio/kqueue/iohandlermanager.cpp
r706 r707 82 82 } 83 83 84 FdStats &IOHandlerManager::GetStats() { 85 return _fdStats; 86 } 87 84 88 void IOHandlerManager::Initialize() { 85 89 _fdStats.Reset(); -
trunk/sources/thelib/src/netio/select/iohandlermanager.cpp
r706 r707 47 47 } 48 48 49 FdStats &IOHandlerManager::GetStats() { 50 return _fdStats; 51 } 52 49 53 void IOHandlerManager::Initialize() { 50 54 _fdStats.Reset(); -
trunk/sources/thelib/src/protocols/protocolmanager.cpp
r577 r707 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 21 21 #include "protocols/protocolmanager.h" 22 22 #include "protocols/baseprotocol.h" 23 #include "netio/netio.h" 23 24 24 25 map<uint32_t, BaseProtocol *> ProtocolManager::_activeProtocols; … … 81 82 return _activeProtocols; 82 83 } 84 85 void ProtocolManager::GetNetworkedProtocols(map<uint32_t, BaseProtocol *> &result) { 86 result.clear(); 87 FOR_MAP(_activeProtocols, uint32_t, BaseProtocol *, i) { 88 BaseProtocol *pProtocol = MAP_VAL(i)->GetNearEndpoint(); 89 if (MAP_HAS1(result, pProtocol->GetId())) 90 continue; 91 IOHandler *pIOHandler = pProtocol->GetIOHandler(); 92 if ((pIOHandler == NULL) 93 || ((pIOHandler->GetType() != IOHT_TCP_CARRIER) 94 && (pIOHandler->GetType() != IOHT_UDP_CARRIER))) 95 continue; 96 result[pProtocol->GetId()] = pProtocol; 97 } 98 }
Note: See TracChangeset
for help on using the changeset viewer.
