Convert sse code to use channel body instead of direct access to output stream