client: use writev() where possible