-while ((my $i = Net::Z3950::ZOOM::event([ @z ])) != 0) {
- print("n = ", $i-1, " event = ",
- Net::Z3950::ZOOM::connection_last_event($z[$i-1]), "\n");
+while ((my $i = Net::Z3950::ZOOM::event(\@z)) != 0) {
+ my $ev = Net::Z3950::ZOOM::connection_last_event($z[$i-1]);
+ print("connection ", $i-1, ": event $ev (",
+ Net::Z3950::ZOOM::event_str($ev), ")\n");
+ # It would be nice to display results as they come in, but the
+ # ability to do so is dependent on the END event, which was
+ # introduced only in YAZ 2.1.17. If you have a sufficiently new
+ # YAZ, please use the alternative "async.pl", which is similar to
+ # this program except in its asynchronous display.