re-write in terms of Transport and Buf