diff --git a/ndn-cpp/transport/udp-transport.hpp b/ndn-cpp/transport/udp-transport.hpp
index 76c3f36..b720337 100644
--- a/ndn-cpp/transport/udp-transport.hpp
+++ b/ndn-cpp/transport/udp-transport.hpp
@@ -6,6 +6,7 @@
 #ifndef NDN_UDPTRANSPORT_HPP
 #define NDN_UDPTRANSPORT_HPP
 
+#include <string>
 #include "../c/transport/udp-transport.h"
 #include "../c/encoding/binary-xml-element-reader.h"
 #include "transport.hpp"
@@ -14,18 +15,53 @@
   
 class UdpTransport : public Transport {
 public:
+  /**
+   * A UdpTransport::ConnectionInfo extends Transport::ConnectionInfo to hold the host and port info for the UDP connection.
+   */
+  class ConnectionInfo : public Transport::ConnectionInfo {
+  public:
+    /**
+     * Create a ConnectionInfo with the given host and port.
+     * @param host The host for the connection.
+     * @param port The port number for the connection.
+     */
+    ConnectionInfo(const char *host, unsigned short port)
+    : host_(host), port_(port)
+    {
+    }
+     
+    /**
+     * Get the host given to the constructor.
+     * @return A string reference for the host.
+     */
+    const std::string &getHost() const { return host_; }
+    
+    /**
+     * Get the port given to the constructor.
+     * @return The port number.
+     */
+    unsigned short getPort() const { return port_; }
+    
+    virtual ~ConnectionInfo();
+
+  private:
+    std::string host_;
+    unsigned short port_;
+  };
+
   UdpTransport() 
-  : node_(0), isConnected_(false)
+  : elementListener_(0), isConnected_(false)
   {
     ndn_UdpTransport_init(&transport_);
     elementReader_.partialData.array = 0;
   }
   
   /**
-   * Connect to the host specified in node.
-   * @param node Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
+   * Connect according to the info in ConnectionInfo, and processEvents() will use elementListener.
+   * @param connectionInfo A reference to a TcpTransport::ConnectionInfo.
+   * @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
    */
-  virtual void connect(Node &node);
+  virtual void connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener);
   
   /**
    * Set data to the host
@@ -35,7 +71,7 @@
   virtual void send(const unsigned char *data, unsigned int dataLength);
 
   /**
-   * Process any data to receive.  For each element received, call node.onReceivedElement.
+   * Process any data to receive.  For each element received, call elementListener.onReceivedElement.
    * This is non-blocking and will return immediately if there is no data to receive.
    * You should normally not call this directly since it is called by Face.processEvents.
    * @throw This may throw an exception for reading data or in the callback for processing the data.  If you
@@ -55,7 +91,7 @@
 private:
   struct ndn_UdpTransport transport_;
   bool isConnected_;
-  Node *node_;
+  ElementListener *elementListener_;
   // TODO: This belongs in the socket listener.
   ndn_BinaryXmlElementReader elementReader_;
 };
