synchronous C client example