blob: a8a354eb3c23fa5528f7d203c37b7a73788b69ab [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
21 virtual void connect(char *host, unsigned short port);
22
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