2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_PINGDATA_H
10 #define SQUID_SRC_PINGDATA_H
12 #include "mem/PoolingAllocator.h"
17 class PeerSelectorPingMonitor
;
19 typedef std::pair
<const timeval
, PeerSelector
*> WaitingPeerSelector
;
20 /// waiting PeerSelector objects, ordered by their absolute deadlines
21 typedef std::multimap
<timeval
, PeerSelector
*, std::less
<timeval
>, PoolingAllocator
<WaitingPeerSelector
> > WaitingPeerSelectors
;
22 typedef WaitingPeerSelectors::iterator WaitingPeerSelectorPosition
;
24 /// ICP probing of cache_peers during peer selection
31 /// no ICP responses are expected beyond the returned absolute time
32 /// \returns start + timeout
33 timeval
deadline() const;
40 int n_replies_expected
;
41 int timeout
; /* msec */
47 friend PeerSelectorPingMonitor
;
48 /// maintained by PeerSelectorPingMonitor
49 WaitingPeerSelectorPosition monitorRegistration
;
52 #endif /* SQUID_SRC_PINGDATA_H */