TCP and UDP loopback test