NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
network-monitor.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_UTIL_NETWORK_MONITOR_HPP
23 #define NDN_UTIL_NETWORK_MONITOR_HPP
24 
25 #include "signal.hpp"
26 
27 // forward declaration
28 namespace boost {
29 namespace asio {
30 class io_service;
31 } // namespace asio
32 } // namespace boost
33 
34 namespace ndn {
35 namespace util {
36 
53 class NetworkMonitor : boost::noncopyable
54 {
55 public:
56  class Error : public std::runtime_error
57  {
58  public:
59  explicit
60  Error(const std::string& what)
61  : std::runtime_error(what)
62  {
63  }
64  };
65 
71  explicit
72  NetworkMonitor(boost::asio::io_service& io);
73 
77  ~NetworkMonitor();
78 
80 
81 private:
82  class Impl;
83  std::unique_ptr<Impl> m_impl;
84 };
85 
86 } // namespace util
87 } // namespace autoconfig
88 
89 #endif // NDN_UTIL_NETWORK_MONITOR_HPP
Error(const std::string &what)
Copyright (c) 2011-2015 Regents of the University of California.
Copyright (c) 2013-2016 Regents of the University of California.
Network state change monitor.
STL namespace.
provides a lightweight signal / event system
Signal< NetworkMonitor > onNetworkStateChanged