Files
NFD/daemon/face/tcp-face.hpp
T
Alexander Afanasyev d32cb9657c face/tcp: Implementing mock version of TcpFace
The real version should avoid all exceptions in the processing path,
enable lazy decoding of Interest/Data packets, and implement
LocalControlHeader processing and association with Interest/Data
packets.

Change-Id: Ied907b3d10b7110a1dcc05d0d6d3c0dd277df8e1
refs: #1132, #1133, #1134, #1135
2014-01-28 22:59:20 -08:00

38 lines
762 B
C++

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (C) 2014 Named Data Networking Project
* See COPYING for copyright and distribution information.
*/
#ifndef NFD_FACE_TCP_FACE_HPP
#define NFD_FACE_TCP_FACE_HPP
#include "stream-face.hpp"
namespace ndn
{
/**
* \brief Implementation of Face abstraction that uses TCP
* as underlying transport mechanism
*/
class TcpFace : public StreamFace<boost::asio::ip::tcp>
{
public:
typedef boost::asio::ip::tcp protocol;
TcpFace(FaceId id,
const shared_ptr<protocol::socket>& socket);
// from Face
virtual void
sendInterest(const Interest& interest);
virtual void
sendData(const Data& data);
};
} // namespace ndn
#endif // NFD_FACE_TCP_FACE_HPP