Some networking related common code has been added.