blob: a5d0ca86f878b7cbfb06f3c1f3c963dd24af965f [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_);
19 }
20
Jeff Thompsonbeb8b7d2013-07-16 15:49:21 -070021 virtual void connect(const char *host, unsigned short port);
Jeff Thompsonfcf347d2013-07-15 11:30:44 -070022
23 virtual void send(unsigned char *data, unsigned int dataLength);
24
25 virtual unsigned int receive(unsigned char *buffer, unsigned int bufferLength);
26
27private:
28 struct ndn_TcpTransport transport_;
29};
30
31}
32
33#endif