blob: b3b8d30982aac417e8c52b001e5fa3441170d32d [file] [log] [blame]
/**
* @author: Jeff Thompson
* See COPYING for copyright and distribution information.
*/
#ifndef NDN_TCPTRANSPORT_HPP
#define NDN_TCPTRANSPORT_HPP
#include "../c/transport/TcpTransport.h"
#include "../c/encoding/BinaryXMLElementReader.h"
#include "Transport.hpp"
namespace ndn {
class TcpTransport : public Transport {
public:
TcpTransport()
{
ndn_TcpTransport_init(&transport_);
ndn_ = 0;
}
/**
*
* @param ndn Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
*/
virtual void connect(NDN &ndn);
virtual void send(const unsigned char *data, unsigned int dataLength);
virtual void tempReceive();
private:
struct ndn_TcpTransport transport_;
NDN *ndn_;
// TODO: This belongs in the socket listener.
ndn_BinaryXmlElementReader elementReader_;
};
}
#endif