xrootd: cleanup
Created by: EgorMatirov
Cleanup tests and main code by extracting SendResponse
, ReadResponse
, and ReadRequest
functions.
Add for the sake of perfomance and avoiding extra allocations ReadResponseWithReuse
that takes headerBytes
slice and pointer to header
as arguments.
Extract helper methods from session.consume for the better readability.
Rename *Code
constants in protocol.go