1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #ifndef anna_test_Communicator_hpp
10 #define anna_test_Communicator_hpp
12 #include <anna/comm/Communicator.hpp>
18 class Communicator : public comm::Communicator {
20 Communicator () : comm::Communicator (),
25 a_avgDelay ("AvgDelay"),
29 void setDelay (const Millisecond delay) { a_delay = delay; }
30 void setMaxMessage (const int maxMessage) { a_maxMessage = maxMessage; }
32 int getMaxMessage () const { return a_maxMessage; }
33 int getMessage () const { return a_messageCounter; }
35 bool canContinue (const comm::ClientSocket&) noexcept(false);
36 void delay () noexcept(false);
41 Millisecond a_initTime;
45 Average <Microsecond> a_avgDelay;
47 void eventOverQuota (const comm::ClientSocket&) ;