Functions for simple network programming