Moved socketReady function from server to network module.