Alexander Afanasyev | a9034b0 | 2014-01-26 18:32:02 -0800 | [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_TCP_FACE_HPP |
| 8 | #define NFD_FACE_TCP_FACE_HPP |
| 9 | |
| 10 | #include "stream-face.hpp" |
| 11 | |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 12 | namespace nfd |
Alexander Afanasyev | a9034b0 | 2014-01-26 18:32:02 -0800 | [diff] [blame] | 13 | { |
| 14 | |
| 15 | /** |
| 16 | * \brief Implementation of Face abstraction that uses TCP |
| 17 | * as underlying transport mechanism |
| 18 | */ |
| 19 | class TcpFace : public StreamFace<boost::asio::ip::tcp> |
| 20 | { |
| 21 | public: |
Alexander Afanasyev | d32cb96 | 2014-01-28 12:43:47 -0800 | [diff] [blame] | 22 | typedef boost::asio::ip::tcp protocol; |
| 23 | |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame] | 24 | TcpFace(const shared_ptr<protocol::socket>& socket); |
Alexander Afanasyev | a9034b0 | 2014-01-26 18:32:02 -0800 | [diff] [blame] | 25 | |
Alexander Afanasyev | 8ad71ba | 2014-01-27 00:07:14 -0800 | [diff] [blame] | 26 | // from Face |
| 27 | virtual void |
| 28 | sendInterest(const Interest& interest); |
| 29 | |
| 30 | virtual void |
| 31 | sendData(const Data& data); |
Alexander Afanasyev | a9034b0 | 2014-01-26 18:32:02 -0800 | [diff] [blame] | 32 | }; |
| 33 | |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 34 | } // namespace nfd |
Alexander Afanasyev | a9034b0 | 2014-01-26 18:32:02 -0800 | [diff] [blame] | 35 | |
| 36 | #endif // NFD_FACE_TCP_FACE_HPP |