LookupDetails.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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/* DEBUG: section 78 DNS lookups */
10
11#ifndef SQUID_DNS_LOOKUPDETAILS_H
12#define SQUID_DNS_LOOKUPDETAILS_H
13
14#include "SquidString.h"
15
16namespace Dns
17{
18
21{
22public:
23 LookupDetails() : wait(-1) {}
24 LookupDetails(const String &anError, int aWait) : error(anError), wait(aWait) {}
25
26 std::ostream &print(std::ostream &os) const;
27
28public:
30 int wait;
31};
32
33} // namespace Dns
34
35inline std::ostream &
36operator <<(std::ostream &os, const Dns::LookupDetails &dns)
37{
38 return dns.print(os);
39}
40
41#endif /* SQUID_DNS_LOOKUPDETAILS_H */
42
std::ostream & operator<<(std::ostream &os, const Dns::LookupDetails &dns)
Definition: LookupDetails.h:36
encapsulates DNS lookup results
Definition: LookupDetails.h:21
LookupDetails()
no error, no lookup delay (i.e., no lookup)
Definition: LookupDetails.h:23
String error
error message for unsuccessful lookups; empty otherwise
Definition: LookupDetails.h:29
std::ostream & print(std::ostream &os) const
int wait
msecs spent waiting for the lookup (if any) or -1 (if none)
Definition: LookupDetails.h:30
LookupDetails(const String &anError, int aWait)
Definition: LookupDetails.h:24
generic DNS API
Definition: forward.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors