1 /* 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors 3 * 4 * Squid software is distributed under GPLv2+ license and includes 5 * contributions from numerous individuals and organizations. 6 * Please see the COPYING and CONTRIBUTORS files for details. 7 */ 8 9 #ifndef SQUID_SRC_MESSAGESIZES_H 10 #define SQUID_SRC_MESSAGESIZES_H 11 12 /** 13 * Counters used to collate the traffic size measurements 14 * for a transaction message. 15 */ 16 class MessageSizes 17 { 18 public: MessageSizes()19 MessageSizes() : header(0), payloadData(0) {} 20 21 /// size of message header block (if any) 22 /// including message Request-Line or Start-Line. 23 uint64_t header; 24 25 /// total size of payload block(s) excluding transfer encoding overheads 26 uint64_t payloadData; 27 28 /// total message size messageTotal()29 uint64_t messageTotal() const {return header + payloadData;} 30 }; 31 32 #endif /* SQUID_SRC_MESSAGESIZES_H */ 33 34