blob: f90a5be8a8bb55efe604c9f6bae55af751bfb937 [file] [log] [blame]
Davide Pesaventobc4dd8c2014-02-14 20:01:01 +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_UNIX_STREAM_FACE_HPP
8#define NFD_FACE_UNIX_STREAM_FACE_HPP
9
10#include "stream-face.hpp"
11
Alexander Afanasyevc78b1412014-02-19 14:08:26 -080012#ifndef HAVE_UNIX_SOCKETS
13#error "Cannot include this file when UNIX sockets are not available"
14#endif
15
Davide Pesaventod8d4d982014-03-21 18:47:58 +010016namespace nfd {
Davide Pesaventobc4dd8c2014-02-14 20:01:01 +010017
18/**
19 * \brief Implementation of Face abstraction that uses stream-oriented
20 * Unix domain sockets as underlying transport mechanism
21 */
Alexander Afanasyevbd220a02014-02-20 00:29:56 -080022class UnixStreamFace : public StreamFace<boost::asio::local::stream_protocol, LocalFace>
Davide Pesaventobc4dd8c2014-02-14 20:01:01 +010023{
24public:
Davide Pesavento73c65d72014-03-21 18:08:59 +010025 explicit
Davide Pesaventobc4dd8c2014-02-14 20:01:01 +010026 UnixStreamFace(const shared_ptr<protocol::socket>& socket);
Davide Pesaventobc4dd8c2014-02-14 20:01:01 +010027};
28
29} // namespace nfd
30
31#endif // NFD_FACE_UNIX_STREAM_FACE_HPP