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_); |
| 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 | |
| 27 | private: |
| 28 | struct ndn_TcpTransport transport_; |
| 29 | }; |
| 30 | |
| 31 | } |
| 32 | |
| 33 | #endif |