set_default


Description:

[ Version ( since = "2.22" ) ]
public void set_default ()

Sets this to be the application's default resolver (reffing this, and unreffing the previous default resolver, if any).

Future calls to get_default will return this resolver.

This can be used if an application wants to perform any sort of DNS caching or "pinning"; it can implement its own Resolver that calls the original default resolver for DNS operations, and implements its own cache policies on top of that, and then set itself as the default resolver for all later code to use.

Parameters:

this

the new default Resolver