c version of the client