blob: c4fa1c6774b08ad0b1f0cb2993d3cf9c9a9a1c4d [file] [log] [blame]
Jeff Thompsonfcf347d2013-07-15 11:30:44 -07001/**
2 * @author: Jeff Thompson
3 * See COPYING for copyright and distribution information.
4 */
5
6#ifndef NDN_TCPTRANSPORT_HPP
7#define NDN_TCPTRANSPORT_HPP
8
9#include "../c/transport/TcpTransport.h"
10#include "Transport.hpp"
11
12namespace ndn {
13
14class TcpTransport : public Transport {
15public:
16 TcpTransport()
17 {
18 ndn_TcpTransport_init(&transport_);
Jeff Thompson0cb7aee2013-07-16 16:18:06 -070019 ndn_ = 0;
Jeff Thompsonfcf347d2013-07-15 11:30:44 -070020 }
21
Jeff Thompson0cb7aee2013-07-16 16:18:06 -070022 virtual void connect(NDN &ndn);
Jeff Thompsonfcf347d2013-07-15 11:30:44 -070023
24 virtual void send(unsigned char *data, unsigned int dataLength);
25
Jeff Thompson0cb7aee2013-07-16 16:18:06 -070026 virtual void tempReceive();
Jeff Thompsonfcf347d2013-07-15 11:30:44 -070027
28private:
29 struct ndn_TcpTransport transport_;
Jeff Thompson0cb7aee2013-07-16 16:18:06 -070030 NDN *ndn_;
Jeff Thompsonfcf347d2013-07-15 11:30:44 -070031};
32
33}
34
35#endif