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
diff --git a/include/ndn-cpp/transport/unix-transport.hpp b/include/ndn-cpp/transport/unix-transport.hpp
index bb77bb4..1cc4758 100644
--- a/include/ndn-cpp/transport/unix-transport.hpp
+++ b/include/ndn-cpp/transport/unix-transport.hpp
@@ -13,49 +13,24 @@
 
 namespace ndn {
   
-class UnixTransport : public Transport {
+class UnixTransport : public Transport
+{
 public:
   UnixTransport(const std::string &unixSocket = "/tmp/.ndnd.sock");
   ~UnixTransport();
 
-  /**
-   * 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.
-   */
+  // from Transport
   virtual void 
-  connect(ElementListener& elementListener);
+  connect(boost::asio::io_service &ioService, const ReceiveCallback &receiveCallback);
   
-  /**
-   * 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);
-
-  /**
-   * 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();
-  
-  virtual bool 
-  getIsConnected();
-
-  /**
-   * Close the connection to the host.
-   */
   virtual void 
   close();
+
+  virtual void 
+  send(const Block &wire);
   
 private:
   std::string unixSocket_;
-  bool isConnected_;
 
   class Impl;
   std::auto_ptr<Impl> impl_;
