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_TCPTRANSPORT_HPP |
| 7 | #define NDN_TCPTRANSPORT_HPP |
| 8 | |
| 9 | #include "../c/transport/TcpTransport.h" |
| 10 | #include "Transport.hpp" |
| 11 | |
| 12 | namespace ndn { |
| 13 | |
| 14 | class TcpTransport : public Transport { |
| 15 | public: |
| 16 | TcpTransport() |
| 17 | { |
| 18 | ndn_TcpTransport_init(&transport_); |
Jeff Thompson | 0cb7aee | 2013-07-16 16:18:06 -0700 | [diff] [blame^] | 19 | ndn_ = 0; |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 20 | } |
| 21 | |
Jeff Thompson | 0cb7aee | 2013-07-16 16:18:06 -0700 | [diff] [blame^] | 22 | virtual void connect(NDN &ndn); |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 23 | |
| 24 | virtual void send(unsigned char *data, unsigned int dataLength); |
| 25 | |
Jeff Thompson | 0cb7aee | 2013-07-16 16:18:06 -0700 | [diff] [blame^] | 26 | virtual void tempReceive(); |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 27 | |
| 28 | private: |
| 29 | struct ndn_TcpTransport transport_; |
Jeff Thompson | 0cb7aee | 2013-07-16 16:18:06 -0700 | [diff] [blame^] | 30 | NDN *ndn_; |
Jeff Thompson | fcf347d | 2013-07-15 11:30:44 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | } |
| 34 | |
| 35 | #endif |