Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
| 4 | */ |
| 5 | |
| 6 | #ifndef NDN_TRANSPORT_HPP |
| 7 | #define NDN_TRANSPORT_HPP |
| 8 | |
Jeff Thompson | b605b5d | 2013-07-30 15:12:56 -0700 | [diff] [blame] | 9 | #include <vector> |
| 10 | |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 11 | namespace ndn { |
Jeff Thompson | 0cb7aee | 2013-07-16 16:18:06 -0700 | [diff] [blame] | 12 | |
| 13 | class NDN; |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 14 | class Transport { |
| 15 | public: |
Jeff Thompson | 2ed62fb | 2013-07-16 18:10:30 -0700 | [diff] [blame] | 16 | /** |
| 17 | * |
| 18 | * @param ndn Not a shared_ptr because we assume that it will remain valid during the life of this Transport object. |
| 19 | */ |
Jeff Thompson | 0cb7aee | 2013-07-16 16:18:06 -0700 | [diff] [blame] | 20 | virtual void connect(NDN &ndn); |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 21 | |
Jeff Thompson | b605b5d | 2013-07-30 15:12:56 -0700 | [diff] [blame] | 22 | virtual void send(const unsigned char *data, unsigned int dataLength); |
| 23 | |
| 24 | void send(const std::vector<unsigned char> &data) |
| 25 | { |
| 26 | send(&data[0], data.size()); |
| 27 | } |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } |
| 31 | |
| 32 | #endif |