Modify transport to support snapshot file transferring.
Merge pull request #139 from EasonLiao/snap_transport

Change the interface of transport.