Implement TcpTransport
diff --git a/ndn-cpp/c/network/TcpTransport.h b/ndn-cpp/c/network/TcpTransport.h
index 82ef03b..19ed4e2 100644
--- a/ndn-cpp/c/network/TcpTransport.h
+++ b/ndn-cpp/c/network/TcpTransport.h
@@ -8,6 +8,8 @@
#ifndef NDN_TCPTRANSPORT_H
#define NDN_TCPTRANSPORT_H
+#include "../errors.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -16,11 +18,18 @@
int socketDescriptor; /**< -1 if not connected */
};
-static inline void ndn_TcpTransport_init(ndn_TcpTransport *self)
+static inline void ndn_TcpTransport_init(struct ndn_TcpTransport *self)
{
self->socketDescriptor = -1;
}
+ndn_Error ndn_TcpTransport_connect(struct ndn_TcpTransport *self, char *host, unsigned short port);
+
+ndn_Error ndn_TcpTransport_send(struct ndn_TcpTransport *self, unsigned char *data, unsigned int dataLength);
+
+ndn_Error ndn_TcpTransport_receive
+ (struct ndn_TcpTransport *self, unsigned char *buffer, unsigned int bufferLength, unsigned int *nBytes);
+
int testTcpTransport(unsigned char *data, unsigned int dataLength);
#ifdef __cplusplus