blob: 46404da976db12d7637c1ca5d84026cdf3676155 [file] [log] [blame]
Giulio Grassi624f6c62014-02-18 19:42:14 +01001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NFD_FACE_MULTICAST_UDP_FACE_HPP
8#define NFD_FACE_MULTICAST_UDP_FACE_HPP
9
10#include "udp-face.hpp"
11
12namespace nfd
13{
14
15/**
16 * \brief Implementation of Face abstraction that uses
17 * multicast UDP as underlying transport mechanism
18 */
19class MulticastUdpFace : public UdpFace
20{
21public:
22 typedef boost::asio::ip::udp protocol;
23
24 /**
25 * \brief Creates a Udp face for multicast communication
26 */
27 explicit
28 MulticastUdpFace(const shared_ptr<protocol::socket>& socket);
29
30 const boost::asio::ip::udp::endpoint&
31 getMulticastGroup() const;
32
33 // from Face
34 virtual void
35 sendInterest(const Interest& interest);
36
37 virtual void
38 sendData(const Data& data);
39
40 virtual bool
41 isMultiAccess() const;
42
43private:
44 boost::asio::ip::udp::endpoint m_multicastGroup;
45};
46
47} // namespace nfd
48
49#endif // NFD_FACE_MULTICAST_UDP_FACE_HPP