blob: a24a4dc4db932ab2c3f52b6f50816a219dc2553d [file] [log] [blame]
Jeff Thompsonbc53c522013-07-17 17:11:48 -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/UdpTransport.h"
10#include "../c/encoding/BinaryXMLElementReader.h"
11#include "Transport.hpp"
12
13namespace ndn {
14
15class UdpTransport : public Transport {
16public:
17 UdpTransport()
18 {
19 ndn_UdpTransport_init(&transport_);
20 ndn_ = 0;
21 }
22
23 /**
24 *
25 * @param ndn Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
26 */
27 virtual void connect(NDN &ndn);
28
29 virtual void send(unsigned char *data, unsigned int dataLength);
30
31 virtual void tempReceive();
32
33private:
34 struct ndn_UdpTransport transport_;
35 NDN *ndn_;
36 // TODO: This belongs in the socket listener.
37 ndn_BinaryXMLElementReader elementReader_;
38};
39
40}
41
42#endif