Created a method to get the NetworkConnection from the NetworkWorker.