NetworkSession

class NetworkSession(pointer: <Error class: unknown class><<Error class: unknown class>>)

Manages network configuration.

Skipped during bindings generation

  • method cache-directory: Property has no getter nor setter

  • method data-directory: Property has no getter nor setter

  • method is-ephemeral: Property has no getter nor setter

Since

2.40

Constructors

Link copied to clipboard
constructor()

Creates a new #WebKitNetworkSession with an ephemeral #WebKitWebsiteDataManager.

constructor(dataDirectory: String? = null, cacheDirectory: String? = null)

Creates a new #WebKitNetworkSession with a persistent #WebKitWebsiteDataManager. The parameters @data_directory and @cache_directory will be used as construct properties of the #WebKitWebsiteDataManager of the network session. Note that if null is passed, the default directory will be passed to #WebKitWebsiteDataManager so that webkit_website_data_manager_get_base_data_directory() and webkit_website_data_manager_get_base_cache_directory() always return a value for non ephemeral sessions.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val webkitNetworkSessionPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun allowTlsCertificateForHost(certificate: <Error class: unknown class>, host: String)

Ignore further TLS errors on the @host for the certificate present in @info.

Link copied to clipboard
fun connectDownloadStarted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (download: Download) -> Unit): <Error class: unknown class>

This signal is emitted when a new download request is made.

Link copied to clipboard

Requests downloading of the specified URI string.

Link copied to clipboard

Get the #WebKitCookieManager of @session.

Link copied to clipboard

Get whether Intelligent Tracking Prevention (ITP) is enabled or not.

Link copied to clipboard
fun getItpSummary(cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Asynchronously get the list of #WebKitITPThirdParty seen for @session.

Link copied to clipboard
fun getItpSummaryFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>>

Finish an asynchronous operation started with webkit_network_session_get_itp_summary().

Link copied to clipboard

Get whether persistent credential storage is enabled or not.

Link copied to clipboard

Get the TLS errors policy of @session.

Link copied to clipboard

Get the #WebKitWebsiteDataManager of @session.

Link copied to clipboard

Get whether @session is ephemeral. A #WebKitNetworkSession is ephemeral when its #WebKitWebsiteDataManager is ephemeral. See #WebKitWebsiteDataManager:is-ephemeral for more details.

Link copied to clipboard
fun prefetchDns(hostname: String)

Resolve the domain name of the given @hostname in advance, so that if a URI of @hostname is requested the load will be performed more quickly.

Link copied to clipboard
fun setItpEnabled(enabled: Boolean)

Enable or disable Intelligent Tracking Prevention (ITP).

Link copied to clipboard

Enable or disable persistent credential storage.

Link copied to clipboard
fun setProxySettings(proxyMode: NetworkProxyMode, proxySettings: NetworkProxySettings? = null)

Set the network proxy settings to be used by connections started in @session session.

Link copied to clipboard

Set the TLS errors policy of @session as @policy.