blob: 8492f542ed1e3a9cbd12034cb1a8c12388e6c54b [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 Pesaventobc4dd8c2014-02-14 20:01:01 +010016namespace nfd
17{
18
19/**
20 * \brief Implementation of Face abstraction that uses stream-oriented
21 * Unix domain sockets as underlying transport mechanism
22 */
Alexander Afanasyevbd220a02014-02-20 00:29:56 -080023class UnixStreamFace : public StreamFace<boost::asio::local::stream_protocol, LocalFace>
Davide Pesaventobc4dd8c2014-02-14 20:01:01 +010024{
25public:
26 typedef boost::asio::local::stream_protocol protocol;
27
28 explicit
29 UnixStreamFace(const shared_ptr<protocol::socket>& socket);
Davide Pesaventobc4dd8c2014-02-14 20:01:01 +010030};
31
32} // namespace nfd
33
34#endif // NFD_FACE_UNIX_STREAM_FACE_HPP