Update C Client to thread safe and auto connect.