diff --git a/ndn-cpp/face.hpp b/ndn-cpp/face.hpp
index c98932c..b317fa6 100644
--- a/ndn-cpp/face.hpp
+++ b/ndn-cpp/face.hpp
@@ -16,13 +16,12 @@
 class Face {
 public:
   /**
-   * Create a new Face for communication with an NDN hub at host:port with the given Transport object.
-   * @param host The host of the NDN hub.
-   * @param port The port of the NDN hub.
-   * @param transport A pointer to a Transport object used for communication.
+   * Create a new Face for communication with an NDN hub with the given Transport object and connectionInfo.
+   * @param transport A shared_ptr to a Transport object used for communication.
+   * @param transport A shared_ptr to a Transport::ConnectionInfo to be used to connect to the transport.
    */
-  Face(const char *host, unsigned short port, const ptr_lib::shared_ptr<Transport> &transport)
-  : node_(host, port, transport)
+  Face(const ptr_lib::shared_ptr<Transport> &transport, const ptr_lib::shared_ptr<const Transport::ConnectionInfo> &connectionInfo)
+  : node_(transport, connectionInfo)
   {
   }
   
diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
index 44bd7e9..77befa3 100644
--- a/ndn-cpp/node.cpp
+++ b/ndn-cpp/node.cpp
@@ -78,7 +78,7 @@
   
   // TODO: Properly check if we are already connected to the expected host.
   if (!transport_->getIsConnected())
-    transport_->connect(*this);
+    transport_->connect(*connectionInfo_, *this);
   
   transport_->send(*encoding);
 }
diff --git a/ndn-cpp/node.hpp b/ndn-cpp/node.hpp
index 461fe26..b72ba9c 100644
--- a/ndn-cpp/node.hpp
+++ b/ndn-cpp/node.hpp
@@ -18,13 +18,12 @@
 class Node : public ElementListener {
 public:
   /**
-   * Create a new Node for communication with an NDN hub at host:port with the given Transport object.
-   * @param host The host of the NDN hub.
-   * @param port The port of the NDN hub.
-   * @param transport A pointer to a Transport object used for communication.
+   * Create a new Node for communication with an NDN hub with the given Transport object and connectionInfo.
+   * @param transport A shared_ptr to a Transport object used for communication.
+   * @param transport A shared_ptr to a Transport::ConnectionInfo to be used to connect to the transport.
    */
-  Node(const char *host, unsigned short port, const ptr_lib::shared_ptr<Transport> &transport)
-  : host_(host), port_(port), transport_(transport)
+  Node(const ptr_lib::shared_ptr<Transport> &transport, const ptr_lib::shared_ptr<const Transport::ConnectionInfo> &connectionInfo)
+  : transport_(transport), connectionInfo_(connectionInfo)
   {
   }
   
@@ -34,7 +33,7 @@
    * @param port The port of the NDN hub.
    */
   Node(const char *host, unsigned short port)
-  : host_(host), port_(port), transport_(new UdpTransport())
+  : transport_(new UdpTransport()), connectionInfo_(new UdpTransport::ConnectionInfo(host, port))
   {
   }
   
@@ -43,7 +42,7 @@
    * @param host The host of the NDN hub.
    */
   Node(const char *host)
-  : host_(host), port_(9695), transport_(new UdpTransport())
+  : transport_(new UdpTransport()), connectionInfo_(new UdpTransport::ConnectionInfo(host, 9695))
   {
   }
 
@@ -72,12 +71,10 @@
    */
   void processEvents();
   
-  const char *getHost() const { return host_.c_str(); }
-  
-  unsigned short getPort() const { return port_; }
-  
   const ptr_lib::shared_ptr<Transport> &getTransport() { return transport_; }
   
+  const ptr_lib::shared_ptr<const Transport::ConnectionInfo> &getConnectionInfo() { return connectionInfo_; }
+
   void onReceivedElement(const unsigned char *element, unsigned int elementLength);
   
   void shutdown();
@@ -137,9 +134,8 @@
   int getEntryIndexForExpressedInterest(const Name &name);
   
   ptr_lib::shared_ptr<Transport> transport_;
+  ptr_lib::shared_ptr<const Transport::ConnectionInfo> connectionInfo_;
   std::vector<ptr_lib::shared_ptr<PitEntry> > pit_;
-  std::string host_;
-  unsigned short port_;
 };
 
 }
diff --git a/ndn-cpp/transport/tcp-transport.cpp b/ndn-cpp/transport/tcp-transport.cpp
index 248a613..757823d 100644
--- a/ndn-cpp/transport/tcp-transport.cpp
+++ b/ndn-cpp/transport/tcp-transport.cpp
@@ -12,21 +12,26 @@
 
 namespace ndn {
 
-void TcpTransport::connect(Node &node)
+TcpTransport::ConnectionInfo::~ConnectionInfo()
+{  
+}
+
+void TcpTransport::connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener)
 {
+  const TcpTransport::ConnectionInfo &tcpConnectionInfo = dynamic_cast<const TcpTransport::ConnectionInfo &>(connectionInfo);
+  
   ndn_Error error;
-  if ((error = ndn_TcpTransport_connect(&transport_, (char *)node.getHost(), node.getPort())))
+  if ((error = ndn_TcpTransport_connect(&transport_, (char *)tcpConnectionInfo.getHost().c_str(), tcpConnectionInfo.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 *)
+  // Automatically cast elementReader_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_init
-    (&elementReader_, &node, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+    (&elementReader_, &elementListener, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
   
-  // TODO: Properly indicate connected status.
   isConnected_ = true;
-  node_ = &node;
+  elementListener_ = &elementListener;
 }
 
 void TcpTransport::send(const unsigned char *data, unsigned int dataLength)
diff --git a/ndn-cpp/transport/tcp-transport.hpp b/ndn-cpp/transport/tcp-transport.hpp
index 4190600..0a1e4a7 100644
--- a/ndn-cpp/transport/tcp-transport.hpp
+++ b/ndn-cpp/transport/tcp-transport.hpp
@@ -6,6 +6,7 @@
 #ifndef NDN_TCPTRANSPORT_HPP
 #define NDN_TCPTRANSPORT_HPP
 
+#include <string>
 #include "../c/transport/tcp-transport.h"
 #include "../c/encoding/binary-xml-element-reader.h"
 #include "transport.hpp"
@@ -14,18 +15,53 @@
   
 class TcpTransport : public Transport {
 public:
+  /**
+   * A UcpTransport::ConnectionInfo extends Transport::ConnectionInfo to hold the host and port info for the TCP 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_;
+  };
+
   TcpTransport() 
-  : node_(0), isConnected_(false)
+  : elementListener_(0), isConnected_(false)
   {
     ndn_TcpTransport_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_TcpTransport transport_;
   bool isConnected_;
-  Node *node_;
+  ElementListener *elementListener_;
   // TODO: This belongs in the socket listener.
   ndn_BinaryXmlElementReader elementReader_;
 };
diff --git a/ndn-cpp/transport/transport.cpp b/ndn-cpp/transport/transport.cpp
index feb1345..1636e4e 100644
--- a/ndn-cpp/transport/transport.cpp
+++ b/ndn-cpp/transport/transport.cpp
@@ -10,7 +10,11 @@
 
 namespace ndn {
 
-void Transport::connect(Node &node) 
+Transport::ConnectionInfo::~ConnectionInfo()
+{  
+}
+
+void Transport::connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener) 
 {
   throw logic_error("unimplemented");
 }
diff --git a/ndn-cpp/transport/transport.hpp b/ndn-cpp/transport/transport.hpp
index 6fe4534..b27039a 100644
--- a/ndn-cpp/transport/transport.hpp
+++ b/ndn-cpp/transport/transport.hpp
@@ -10,14 +10,24 @@
 
 namespace ndn {
 
-class Node;  
+class ElementListener;
+
 class Transport {
 public:
   /**
-   * 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.
+   * A Transport::ConnectionInfo is a base class for connection information used by subclasses of Transport.
    */
-  virtual void connect(Node &node);
+  class ConnectionInfo { 
+  public:
+    virtual ~ConnectionInfo();
+  };
+  
+  /**
+   * Connect according to the info in ConnectionInfo, and processEvents() will use elementListener.
+   * @param connectionInfo A reference to an object of a subclass of ConnectionInfo.
+   * @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
+   */
+  virtual void connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener);
   
   /**
    * Set data to the host
@@ -32,7 +42,7 @@
   }
   
   /**
-   * 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 silently time out after a brief period if there is no data to receive.
    * You should repeatedly call this from an event loop.
    * @throw This may throw an exception for reading data or in the callback for processing the data.  If you
diff --git a/ndn-cpp/transport/udp-transport.cpp b/ndn-cpp/transport/udp-transport.cpp
index 42551ad..4097b90 100644
--- a/ndn-cpp/transport/udp-transport.cpp
+++ b/ndn-cpp/transport/udp-transport.cpp
@@ -12,21 +12,26 @@
 
 namespace ndn {
 
-void UdpTransport::connect(Node &node)
+UdpTransport::ConnectionInfo::~ConnectionInfo()
+{  
+}
+
+void UdpTransport::connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener)
 {
+  const UdpTransport::ConnectionInfo &udpConnectionInfo = dynamic_cast<const UdpTransport::ConnectionInfo &>(connectionInfo);
+  
   ndn_Error error;
-  if ((error = ndn_UdpTransport_connect(&transport_, (char *)node.getHost(), node.getPort())))
+  if ((error = ndn_UdpTransport_connect(&transport_, (char *)udpConnectionInfo.getHost().c_str(), udpConnectionInfo.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 *)
+  // Automatically cast elementReader_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_init
-    (&elementReader_, &node, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+    (&elementReader_, &elementListener, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
   
-  // TODO: Properly indicate connected status.
   isConnected_ = true;
-  node_ = &node;
+  elementListener_ = &elementListener;
 }
 
 void UdpTransport::send(const unsigned char *data, unsigned int dataLength)
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_;
 };
