X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fcomm%2FCongestionController.cpp;fp=source%2Fcomm%2FCongestionController.cpp;h=7fc6209f6a400022c89b01a744babd5710518962;hp=27333815c2582d1510836d8992bf9127ec7aa3ba;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/comm/CongestionController.cpp b/source/comm/CongestionController.cpp index 2733381..7fc6209 100644 --- a/source/comm/CongestionController.cpp +++ b/source/comm/CongestionController.cpp @@ -53,7 +53,7 @@ comm::CongestionController::CongestionController() : } void comm::CongestionController::setLimit(const int limit) -throw() { +{ Guard guard(a_mutex, "comm::CongestionController (setLimit)"); if(limit < 0 || limit > 100) { @@ -87,7 +87,7 @@ throw() { } void comm::CongestionController::setMaxPendingBytes(const int maxPendingBytes) -throw(RuntimeException) { +noexcept(false) { if(maxPendingBytes == UnusedPendingBytes) { a_maxPendingBytes = UnusedPendingBytes; return; @@ -112,7 +112,7 @@ throw(RuntimeException) { * por su manejador asociado. */ comm::CongestionController::Advice::_v comm::CongestionController::getAdvice(const ClientSocket& clientSocket) -throw() { +{ Guard guard(a_mutex, "comm::CongestionController::getAdvice"); if(a_limit == 0) { @@ -205,13 +205,13 @@ throw() { } void comm::CongestionController::incrementIncomingSocket() -throw(RuntimeException) { +noexcept(false) { Guard guard(a_mutex, "comm::CongestionController::incrementIncomingSocket"); a_incomingSocketCounter ++; } void comm::CongestionController::decrementIncomingSocket() -throw(RuntimeException) { +noexcept(false) { if(a_incomingSocketCounter == 0) return; @@ -237,7 +237,7 @@ throw(RuntimeException) { } int comm::CongestionController::calculeWorkload(const ClientSocket& clientSocket) const -throw() { +{ int maxSize; if(a_maxPendingBytes == UnusedPendingBytes) @@ -256,7 +256,7 @@ throw() { } xml::Node* comm::CongestionController::asXML(xml::Node* parent) const -throw() { +{ static const char* modetxt [] = { "Auto", "Local", "Global" }; xml::Node* result = parent->createChild("comm.CongestionController"); result->createAttribute("Limit", a_limit); @@ -295,7 +295,7 @@ throw() { } comm::CongestionController::Workload comm::CongestionController::getAccumulatedWorkload() const -throw() { +{ Workload result; const Millisecond now = functions::millisecond(); @@ -326,7 +326,7 @@ throw() { comm::CongestionController::Workload comm::CongestionController::getCurrentWorkload(const comm::ClientSocket& clientSocket) const -throw() { +{ Workload result; result.second = calculeWorkload(clientSocket);