Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
loopback_route_fetcher.h
Go to the documentation of this file.
1 // Copyright 2012 Google Inc.
20 
21 #ifndef PAGESPEED_SYSTEM_LOOPBACK_ROUTE_FETCHER_H_
22 #define PAGESPEED_SYSTEM_LOOPBACK_ROUTE_FETCHER_H_
23 
27 
28 struct apr_sockaddr_t;
29 
30 namespace net_instaweb {
31 
32 class AsyncFetch;
33 class RewriteOptions;
34 class MessageHandler;
35 
38  public:
46  LoopbackRouteFetcher(const RewriteOptions* options,
47  const GoogleString& own_ip,
48  int own_port,
49  UrlAsyncFetcher* backend_fetcher);
50  virtual ~LoopbackRouteFetcher();
51 
52  virtual bool SupportsHttps() const {
53  return backend_fetcher_->SupportsHttps();
54  }
55 
56  virtual void Fetch(const GoogleString& url,
57  MessageHandler* message_handler,
58  AsyncFetch* fetch);
59 
61  static bool IsLoopbackAddr(const apr_sockaddr_t* addr);
62 
63  private:
64  const RewriteOptions* const options_;
65  GoogleString own_ip_;
66  int own_port_;
67  UrlAsyncFetcher* const backend_fetcher_;
68 
69 
70 };
71 
72 }
73 
74 #endif
See file comment.
Definition: loopback_route_fetcher.h:37
static bool IsLoopbackAddr(const apr_sockaddr_t *addr)
Returns true if the given address is an IPv4 or IPv6 loopback.
virtual bool SupportsHttps() const
Definition: loopback_route_fetcher.h:52
virtual void Fetch(const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: async_fetch.h:53
Definition: message_handler.h:39
Definition: rewrite_options.h:84
virtual bool SupportsHttps() const
Definition: url_async_fetcher.h:54
Definition: url_async_fetcher.h:33
LoopbackRouteFetcher(const RewriteOptions *options, const GoogleString &own_ip, int own_port, UrlAsyncFetcher *backend_fetcher)