diff --git a/ndn-cpp/c/network/TcpTransport.c b/ndn-cpp/c/network/TcpTransport.c
new file mode 100644
index 0000000..30e6828
--- /dev/null
+++ b/ndn-cpp/c/network/TcpTransport.c
@@ -0,0 +1,89 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "TcpTransport.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <netdb.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+#include <arpa/inet.h>
+
+// get sockaddr, IPv4 or IPv6:
+static inline void *get_in_addr(struct sockaddr *sa)
+{
+	if (sa->sa_family == AF_INET)
+		return &(((struct sockaddr_in*)sa)->sin_addr);
+
+	return &(((struct sockaddr_in6*)sa)->sin6_addr);
+}
+
+ndn_Error ndn_TcpTransport_connect(ndn_TcpTransport *self, char *host, int port)
+{
+  
+}
+
+int testTcpTransport(unsigned char *data, unsigned int dataLength) 
+{
+	struct addrinfo hints, *serverInfo;
+
+  printf("starting\n");
+
+	memset(&hints, 0, sizeof hints);
+	hints.ai_family = AF_UNSPEC;
+	hints.ai_socktype = SOCK_STREAM;
+
+	if (getaddrinfo("E.hub.ndn.ucla.edu", "9695", &hints, &serverInfo) != 0)
+		return 1;
+
+	// loop through all the results and connect to the first we can
+	struct addrinfo *p;
+	for(p = serverInfo; p != NULL; p = p->ai_next) {
+		if ((socketDescriptor = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1)
+			continue;
+
+		if (connect(socketDescriptor, p->ai_addr, p->ai_addrlen) == -1) {
+			close(socketDescriptor);
+			continue;
+		}
+
+		break;
+	}
+
+	if (p == NULL)
+		return 2;
+
+	freeaddrinfo(serverInfo); // all done with this structure
+
+  int nBytes;
+  while (1) {
+    if ((nBytes = send(socketDescriptor, data, dataLength, 0)) < 0)
+      return 1;
+    if (nBytes >= dataLength)
+      break;
+    
+    dataLength -= nBytes;
+  }
+  
+	unsigned char buffer[1000];
+	if ((nBytes = recv(socketDescriptor, buffer, sizeof(buffer) - 1, 0)) == -1)
+    return 1;
+
+	printf("received %d bytes\n", nBytes);
+  int i;
+  for (i = 0; i < nBytes; ++i)
+    printf("%02X ", (unsigned int)buffer[i]);
+  printf("\n");
+
+	close(socketDescriptor);
+
+	return 0;
+}
diff --git a/ndn-cpp/c/network/TcpTransport.h b/ndn-cpp/c/network/TcpTransport.h
new file mode 100644
index 0000000..82ef03b
--- /dev/null
+++ b/ndn-cpp/c/network/TcpTransport.h
@@ -0,0 +1,30 @@
+/* 
+ * File:   TcpTransport.h
+ * Author: jefft0
+ *
+ * Created on July 14, 2013, 4:15 PM
+ */
+
+#ifndef NDN_TCPTRANSPORT_H
+#define	NDN_TCPTRANSPORT_H
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+struct ndn_TcpTransport {
+  int socketDescriptor; /**< -1 if not connected */
+};
+  
+static inline void ndn_TcpTransport_init(ndn_TcpTransport *self)
+{
+  self->socketDescriptor = -1;
+}
+
+int testTcpTransport(unsigned char *data, unsigned int dataLength);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
