Move functionality into ndn_SocketTransport base class.
diff --git a/ndn-cpp/c/transport/SocketTransport.h b/ndn-cpp/c/transport/SocketTransport.h
new file mode 100644
index 0000000..a5e89f7
--- /dev/null
+++ b/ndn-cpp/c/transport/SocketTransport.h
@@ -0,0 +1,41 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_SOCKETTRANSPORT_H
+#define NDN_SOCKETTRANSPORT_H
+
+#include <sys/socket.h>
+#include "../errors.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ SOCKET_TCP,
+ SOCKET_UDP
+} ndn_SocketType;
+
+struct ndn_SocketTransport {
+ int socketDescriptor; /**< -1 if not connected */
+};
+
+static inline void ndn_SocketTransport_init(struct ndn_SocketTransport *self)
+{
+ self->socketDescriptor = -1;
+}
+
+ndn_Error ndn_SocketTransport_connect(struct ndn_SocketTransport *self, ndn_SocketType socketType, char *host, unsigned short port);
+
+ndn_Error ndn_SocketTransport_send(struct ndn_SocketTransport *self, unsigned char *data, unsigned int dataLength);
+
+ndn_Error ndn_SocketTransport_receive
+ (struct ndn_SocketTransport *self, unsigned char *buffer, unsigned int bufferLength, unsigned int *nBytes);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif