Switch to channel buffer instead of input/output streams.
Add reply header.
A request has a header and a body.
Add state variables reflecting session state (negotiatedTimeout and lastEvent heard from the server)