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 | #include "unix-stream-face.hpp" |
| 8 | |
| 9 | namespace nfd { |
| 10 | |
| 11 | // The whole purpose of this file is to specialize the logger, |
| 12 | // otherwise, everything could be put into the header file. |
| 13 | |
Alexander Afanasyev | bd220a0 | 2014-02-20 00:29:56 -0800 | [diff] [blame] | 14 | NFD_LOG_INCLASS_2TEMPLATE_SPECIALIZATION_DEFINE(StreamFace, |
| 15 | UnixStreamFace::protocol, LocalFace, |
| 16 | "UnixStreamFace"); |
Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 17 | |
Junxiao Shi | 7949416 | 2014-04-02 18:25:11 -0700 | [diff] [blame] | 18 | BOOST_STATIC_ASSERT((boost::is_same<UnixStreamFace::protocol::socket::native_handle_type, |
| 19 | int>::value)); |
| 20 | |
Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 21 | UnixStreamFace::UnixStreamFace(const shared_ptr<UnixStreamFace::protocol::socket>& socket) |
Junxiao Shi | 7949416 | 2014-04-02 18:25:11 -0700 | [diff] [blame] | 22 | : StreamFace<protocol, LocalFace>(FaceUri::fromFd(socket->native_handle()), |
| 23 | FaceUri(socket->local_endpoint()), |
| 24 | socket, true) |
Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 25 | { |
| 26 | } |
| 27 | |
Davide Pesavento | bc4dd8c | 2014-02-14 20:01:01 +0100 | [diff] [blame] | 28 | } // namespace nfd |