NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
channel.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25 #ifndef NFD_DAEMON_FACE_CHANNEL_HPP
26 #define NFD_DAEMON_FACE_CHANNEL_HPP
27 
28 #include "common.hpp"
29 
30 namespace nfd {
31 
32 class Face;
33 
34 class Channel : noncopyable
35 {
36 public:
41  typedef function<void(const shared_ptr<Face>& newFace)> FaceCreatedCallback;
42 
46  typedef function<void(const std::string& reason)> ConnectFailedCallback;
47 
48  virtual
49  ~Channel();
50 
51  const FaceUri&
52  getUri() const;
53 
54 protected:
55  void
56  setUri(const FaceUri& uri);
57 
58 private:
59  FaceUri m_uri;
60 };
61 
62 inline const FaceUri&
64 {
65  return m_uri;
66 }
67 
68 } // namespace nfd
69 
70 #endif // NFD_DAEMON_FACE_CHANNEL_HPP
represents the underlying protocol and address used by a Face
Definition: face-uri.hpp:44
const FaceUri & getUri() const
Definition: channel.hpp:63
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:38
ndn cxx Face
Copyright (c) 2013-2015 Regents of the University of California.
Definition: face.cpp:25
void setUri(const FaceUri &uri)
Definition: channel.cpp:34
function< void(const std::string &reason)> ConnectFailedCallback
Prototype for the callback that is called when face is failed to get created.
Definition: channel.hpp:46
virtual ~Channel()
Definition: channel.cpp:29
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback called when face is created (as a response to incoming connection or after...
Definition: channel.hpp:41