Brief description of class still missing. More...
#include <RouteTcpHeader.h>
Public Types | |
| enum | BlockType { TestLeaderNegociation, MeasureResetBallast, MeasureKeepBallast, MeasureIncreaseBallast, SendLoadToSecond, SendLoadToLeader, MeasureResultToLeader, InfoToSecond, InfoToLeader, TestNow, ForwardAddRouteFromMaster, ForwardRemoveRouteFromMaster } |
Public Member Functions | |
| RouteTcpHeader (BlockType type) | |
| RouteTcpHeader (const RouteTcpHeader &o) | |
| std::string | time () const |
Brief description of class still missing.
Implements a serial number to tag all packets and trace bugs in logs.
Description of constructor still missing
References time().
: TcpHeader(ROUTE_TCP_VERSION, type) { time_t t; ::time(&t); _time=t; // for 64-bit platforms time_t is 64-bit long // force cast to int (32 bit) to allow communication // between all types of processors. }
| RouteTcpHeader::RouteTcpHeader | ( | const RouteTcpHeader & | o | ) |
| std::string RouteTcpHeader::time | ( | ) | const |
Referenced by LinkBuffer::bytesAvailable(), and RouteTcpHeader().
{
if(Log::verbosity()>=9) {
char buffer[32];
time_t t=_time;
strftime(buffer, 32, ":%H:%M:%S", gmtime(&t));
return buffer;
} else {
return std::string();
}
}