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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors