[client_socket] light refactoring, minor doc changes, updated tests to
reflect changes