Same as Wait(), but wait on many sockets within the same timeout.

Synopsis

Declared in <util/sock.h>

[[nodiscard]]
virtual
bool
WaitMany(
    std::chrono::milliseconds timeout,
    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 should not be discarded.

Parameters

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.

Created with MrDocs