sanity checking sockets