NetworkSession


Description:

[ CCode ( has_construct_function = false ) ]
public NetworkSession (string? data_directory, string? cache_directory)

Creates a new NetworkSession with a persistent WebsiteDataManager.

The parameters data_directory and cache_directory will be used as construct properties of the WebsiteDataManager of the network session. Note that if null is passed, the default directory will be passed to WebsiteDataManager so that get_base_data_directory and get_base_cache_directory always return a value for non-ephemeral sessions.

It can be passed as the network_session construct parameter of a WebView. A web view created without a network session uses the one of its related view, if any, or the default one returned by get_default.

Parameters:

data_directory

a base directory for data, or null

cache_directory

a base directory for caches, or null

Returns:

the newly created NetworkSession