This function carries out networked (blocked) activity for outstanding requests which have been prepared by the functions yaz_connect(), yaz_search(). yaz_wait() returns when all targets have either completed all requests or otherwise completed (in case of errors).