Skip to content

Proposed API for metered network connection support #288954

@dmitrivMS

Description

@dmitrivMS

This API allows extensions to detect when network connection is slow/metered and adjust automated network activity according. For example, Git extension would postpone auto-sync operations when connection is metered.

declare module 'vscode' {

	export namespace env {
		/**
		 * Whether the current network connection is metered (such as mobile data or tethering).
		 * Always returns `false` if the `update.respectMeteredConnections` setting is disabled.
		 */
		export const isMeteredConnection: boolean;

		/**
		 * Event that fires when the metered connection status changes.
		 */
		export const onDidChangeMeteredConnection: Event<boolean>;
	}
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions