class io.HostNameResolver

class HostNameResolver {
    // fields

    io.SocketAddress const* readonly volatile m_addressTable;
    size_t readonly volatile m_addressCount;
    io.HostNameResolverEvents readonly volatile m_activeEvents;
    std.Error const* readonly volatile m_error;
    bool readonly m_isOpen;

    // construction

    construct();
    destruct();

    // methods

    bool errorcode resolve(
        string_t name,
        io.AddressFamily family = AddressFamily.Undefined
    );

    void cancel();
    void close();

    long errorcode wait(
        io.HostNameResolverEvents eventMask,
        void function* handler(io.HostNameResolverEvents triggeredEvents)
    );

    bool errorcode cancelWait(long handle);

    io.HostNameResolverEvents blockingWait(
        io.HostNameResolverEvents eventMask,
        uint_t timeout = -1
    );

    io.HostNameResolverEvents async asyncWait(io.HostNameResolverEvents eventMask);

    // aliases

    alias dispose = cancel;
};