
The largest part of the code deals with the start of a response. Moving this into a subfunction makes the function clearer as the switch statement inside a switch statement is removed.
The largest part of the code deals with the start of a response. Moving this into a subfunction makes the function clearer as the switch statement inside a switch statement is removed.