Refactor code under protocol.SendReq case into a function call. Clean up
the code into a switch statement to make it more readable.