client: add some function documentation