QVAC Logo

suspend( )

Suspends all active Hyperswarm and Corestore resources.

function suspend(): Promise<void>;

Suspends all active Hyperswarm and Corestore resources. Idempotent — calling while already suspended is a no-op.

Typically used in mobile apps when the application moves to the background, paired with resume() when it returns to the foreground.

Parameters

None.

Returns

Promise<void>

Throws

ErrorWhen
INVALID_RESPONSE_TYPEResponse type does not match expected "suspend"
LIFECYCLE_SUSPEND_FAILEDOne or more resources failed to suspend (partial failure)

Example

await suspend();

On this page