/*
- * $Id: zoomtst8.c,v 1.1 2001-12-30 22:21:11 adam Exp $
+ * $Id: zoomtst8.c,v 1.3 2002-05-21 08:36:04 adam Exp $
*
* Asynchronous multi-target client doing scan
*/
/* connect and init */
ZOOM_connection_connect (z[i], argv[1+i], 0);
+
}
- /* search all */
+ /* scan all */
for (i = 0; i<no; i++)
+ {
+ /* set number of scan terms to be returned. */
+ ZOOM_connection_option_set (z[i], "number", "7");
+ /* and perform scan */
s[i] = ZOOM_connection_scan (z[i], argv[argc-1]);
+ }
/* network I/O. pass number of connections and array of connections */
while (ZOOM_event (no, z))
errmsg, error, addinfo);
else
{
- int j;
+ size_t j;
printf ("%s\n", ZOOM_connection_option_get(z[i], "host"));
for (j = 0; j<ZOOM_scanset_size (s[i]); j++)
{
term = ZOOM_scanset_term (s[i], j, &occur, &len);
if (term)
printf ("%d %.*s %d\n", j, len, term, occur);
-
}
}
}