blob: 460eeddaf4680c47a2d0b1db0b34cb12ce66d0f0 [file] [log] [blame]
/**
* @author: Jeff Thompson
* See COPYING for copyright and distribution information.
*/
#ifndef NDN_UDPTRANSPORT_HPP
#define NDN_UDPTRANSPORT_HPP
#include "../c/transport/UdpTransport.h"
#include "../c/encoding/BinaryXMLElementReader.h"
#include "Transport.hpp"
namespace ndn {
class UdpTransport : public Transport {
public:
UdpTransport()
{
ndn_UdpTransport_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_UdpTransport transport_;
NDN *ndn_;
// TODO: This belongs in the socket listener.
ndn_BinaryXmlElementReader elementReader_;
};
}
#endif