Class Utilities
This class contains utilities not available in the piactl CLI.
public class Utilities
- Inheritance
-
Utilities
- Inherited Members
Constructors
Utilities()
public Utilities()
Utilities(PiaCtl)
public Utilities(PiaCtl piaCtl)
Parameters
piaCtl
PiaCtl
Methods
Snooze(int, CancellationToken)
Disconnects the VPN connection for the specified duration. If the advanced killswitch feature is enabled, snoozing the VPN will prevent internet access.
public Task<PiaResults> Snooze(int duration, CancellationToken ct = default)
Parameters
duration
intThe duration, in seconds, to suspend the VPN.
ct
CancellationToken
Returns
- Task<PiaResults>
A
Task<PiaResults>
containing standard output and standard error results.
SwitchToFastest(MultiRegion)
Switches to the fastest server in a given region. The region must have multiple servers.
public Task<PiaResults> SwitchToFastest(MultiRegion regionPrefix)
Parameters
regionPrefix
MultiRegionThe two-letter prefix of the region in which the servers reside.
Returns
- Task<PiaResults>
A
Task<PiaResults>
containing standard output and standard error results.