A simple sockets wrapper