Refactor some of the SPDY channels to remove code duplication