blob: c76cbc83aedfb664f43f88e980318c2612812702 [file] [log] [blame]
Alexander Afanasyeva9034b02014-01-26 18:32:02 -08001/* -*- 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 Afanasyev18bbf812014-01-29 01:40:23 -080012namespace nfd
Alexander Afanasyeva9034b02014-01-26 18:32:02 -080013{
14
15/**
16 * \brief Implementation of Face abstraction that uses TCP
17 * as underlying transport mechanism
18 */
19class TcpFace : public StreamFace<boost::asio::ip::tcp>
20{
21public:
Alexander Afanasyevd32cb962014-01-28 12:43:47 -080022 typedef boost::asio::ip::tcp protocol;
23
24 TcpFace(FaceId id,
25 const shared_ptr<protocol::socket>& socket);
Alexander Afanasyeva9034b02014-01-26 18:32:02 -080026
Alexander Afanasyev8ad71ba2014-01-27 00:07:14 -080027 // from Face
28 virtual void
29 sendInterest(const Interest& interest);
30
31 virtual void
32 sendData(const Data& data);
Alexander Afanasyeva9034b02014-01-26 18:32:02 -080033};
34
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080035} // namespace nfd
Alexander Afanasyeva9034b02014-01-26 18:32:02 -080036
37#endif // NFD_FACE_TCP_FACE_HPP