Tiny wrapper around socket functions.