diff --git a/ndn-cpp/transport/UdpTransport.cpp b/ndn-cpp/transport/UdpTransport.cpp
new file mode 100644
index 0000000..ae0124f
--- /dev/null
+++ b/ndn-cpp/transport/UdpTransport.cpp
@@ -0,0 +1,54 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include <stdexcept>
+#include "../NDN.hpp"
+#include "../c/util/ndn_realloc.h"
+#include "UdpTransport.hpp"
+
+using namespace std;
+
+namespace ndn {
+
+void UdpTransport::connect(NDN &ndn)
+{
+  ndn_Error error;
+  if (error = ndn_UdpTransport_connect(&transport_, (char *)ndn.getHost(), ndn.getPort()))
+    throw std::runtime_error(ndn_getErrorString(error)); 
+
+  // TODO: This belongs in the socket listener.
+  const unsigned int initialLength = 1000;
+  // Automatically cast ndn_ to (struct ndn_ElementListener *)
+  ndn_BinaryXMLElementReader_init
+    (&elementReader_, &ndn, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+  
+  // TODO: Properly indicate connected status.
+  ndn_ = &ndn;
+}
+
+void UdpTransport::send(unsigned char *data, unsigned int dataLength)
+{
+  ndn_Error error;
+  if (error = ndn_UdpTransport_send(&transport_, data, dataLength))
+    throw std::runtime_error(ndn_getErrorString(error));  
+}
+
+void UdpTransport::tempReceive()
+{
+  try {   
+    ndn_Error error;
+    unsigned char buffer[8000];
+    unsigned int nBytes;
+    if (error = ndn_UdpTransport_receive(&transport_, buffer, sizeof(buffer), &nBytes))
+      throw std::runtime_error(ndn_getErrorString(error));  
+
+    ndn_BinaryXMLElementReader_onReceivedData(&elementReader_, buffer, nBytes);
+  } catch (...) {
+    // This function is called by the socket callback, so don't send an exception back to it.
+    // TODO: Log the exception?
+  }
+}
+
+}
