Added some basic networking utility methods in a separate file