Agreed. As I said, this is really basic. In the future the clientHandler will probably hand off the message for processing elsewhere. At the moment, though, there isn't anything to hook into, so the processing is done here to make the code testable.