Although the descritpion says “Get all node names in cluster” but I got only 1 node name.
int n;
char * node_name;
as_cluster_get_node_names(RtDbConnection::ms_aerospikeIns.cluster,&n,&node_name);
cout<<endl<<"n: "<<n<<endl;
cout<<"node_names: "<<node_name<<endl;
In the above code, n = 2 yet node_name stores only 1 name which is the name of the node whose IP I had provided during the initialisation of the aerospike object.