[#Sock-WaitMany] = xref:Sock.adoc[Sock]::WaitMany :relfileprefix: ../ :mrdocs: Same as `Wait()`, but wait on many sockets within the same timeout. == Synopsis Declared in `<util/sock.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] virtual bool WaitMany( std::chrono::milliseconds timeout, xref:Sock/EventsPerSock.adoc[EventsPerSock]& events_per_sock) const; ---- == Return Value true on success (or timeout, if all `what[].occurred` are returned as 0), false otherwise [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *timeout* [in] | Wait this long for at least one of the requested events to occur. | *events_per_sock* [inout] | Wait for the requested events on these sockets and set `occurred` for the events that actually occurred. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#