some network utils.