diff --git a/include/ndn-cpp/transport/transport.hpp b/include/ndn-cpp/transport/transport.hpp
index 80d41b2..8bfa355 100644
--- a/include/ndn-cpp/transport/transport.hpp
+++ b/include/ndn-cpp/transport/transport.hpp
@@ -8,58 +8,88 @@
 #ifndef NDN_TRANSPORT_HPP
 #define NDN_TRANSPORT_HPP
 
+#include <ndn-cpp/common.hpp>
+
 #include <vector>
+#include <boost/asio.hpp>
 
 namespace ndn {
 
-class ElementListener;
-
 class Transport {
 public:
+  typedef ptr_lib::function<void (const Block &wire)> ReceiveCallback;
+  
+  inline
+  Transport();
+  
+  inline virtual
+  ~Transport();
+
   /**
    * 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.
+   */
+  inline virtual void 
+  connect(boost::asio::io_service &io_service, const ReceiveCallback &receiveCallback);
+  
+  /**
+   * Close the connection.
    */
   virtual void 
-  connect(ElementListener& elementListener) = 0;
-  
+  close() = 0;
+
   /**
    * Set data to the host
    * @param data A pointer to the buffer of data to send.
    * @param dataLength The number of bytes in data.
    */
   virtual void 
-  send(const uint8_t *data, size_t dataLength) = 0;
-  
-  inline void 
-  send(const std::vector<uint8_t>& data)
-  {
-    send(&data[0], data.size());
-  }
-  
-  /**
-   * 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
-   * call this from an main event loop, you may want to catch and log/disregard all exceptions.
-   */
-  virtual void 
-  processEvents() = 0;
+  send(const Block &wire) = 0;
 
-  virtual bool 
-  getIsConnected() = 0;
+  inline bool 
+  isConnected();
+
+protected:
+  inline void
+  receive(const Block &wire);
   
-  /**
-   * Close the connection.  This base class implementation does nothing, but your derived class can override.
-   */
-  virtual void 
-  close();
-  
-  virtual ~Transport();
+protected:
+  boost::asio::io_service *ioService_;
+  bool isConnected_;
+  ReceiveCallback receiveCallback_;
 };
 
+inline
+Transport::Transport()
+  : ioService_(0)
+  , isConnected_(false)
+{
+}
+
+inline
+Transport::~Transport()
+{
+}
+
+inline void 
+Transport::connect(boost::asio::io_service &ioService, const ReceiveCallback &receiveCallback)
+{
+  ioService_ = &ioService;
+  receiveCallback_ = receiveCallback;
+}
+
+inline bool 
+Transport::isConnected()
+{
+  return isConnected_;
+}
+
+inline void
+Transport::receive(const Block &wire)
+{
+  receiveCallback_(wire);
+}
+
 }
 
 #endif
