Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 1 | /* -*- 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 Afanasyev | c78b141 | 2014-02-19 14:08:26 -0800 | [diff] [blame] | 12 | #ifndef HAVE_UNIX_SOCKETS |
| 13 | #error "Cannot include this file when UNIX sockets are not available" |
| 14 | #endif |
| 15 | |
Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 16 | namespace nfd |
| 17 | { |
| 18 | |
| 19 | /** |
| 20 | * \brief Implementation of Face abstraction that uses stream-oriented |
| 21 | * Unix domain sockets as underlying transport mechanism |
| 22 | */ |
Alexander Afanasyev | bd220a0 | 2014-02-20 00:29:56 -0800 | [diff] [blame] | 23 | class UnixStreamFace : public StreamFace<boost::asio::local::stream_protocol, LocalFace> |
Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 24 | { |
| 25 | public: |
| 26 | typedef boost::asio::local::stream_protocol protocol; |
| 27 | |
| 28 | explicit |
| 29 | UnixStreamFace(const shared_ptr<protocol::socket>& socket); |
Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | } // namespace nfd |
| 33 | |
| 34 | #endif // NFD_FACE_UNIX_STREAM_FACE_HPP |