Refactor packet writes into their own channel handler class.