Refactored NetworkReceiver to clearly define the public API and separate all the code to run a receiver into NetworkReceiverHandler.