Added basic support for the framed transport.

For now, not taking advantage of knowing the frame size (some
nice optimizations are possible regarding that).