some more reader connection state abstraction
and a slightly more logical (and efficient) handle_frame clause order