Merge pull request #139 from EasonLiao/snap_transport

Change the interface of transport.