Table of Contents

Class NetworkSession

Namespace
WebKit
Assembly
WebKit-6.0.dll
public sealed class NetworkSession : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
NetworkSession
Implements
Inherited Members

Constructors

NetworkSession(params ConstructArgument[])

[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public NetworkSession(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

NetworkSession(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected NetworkSession(CreationData data)

Parameters

data CreationData

NetworkSession(NetworkSessionHandle)

protected NetworkSession(NetworkSessionHandle handle)

Parameters

handle NetworkSessionHandle

Fields

DownloadStartedSignal

Signal Descriptor for OnDownloadStarted.

public static readonly Signal<NetworkSession, NetworkSession.DownloadStartedSignalArgs> DownloadStartedSignal

Field Value

Signal<NetworkSession, NetworkSession.DownloadStartedSignalArgs>

IsEphemeralPropertyDefinition

public static readonly Property<bool, NetworkSession> IsEphemeralPropertyDefinition

Field Value

Property<bool, NetworkSession>

Properties

IsEphemeral

public bool IsEphemeral { get; }

Property Value

bool

Methods

AllowTlsCertificateForHost(TlsCertificate, string)

[Version("2.40")]
public void AllowTlsCertificateForHost(TlsCertificate certificate, string host)

Parameters

certificate TlsCertificate
host string

DownloadUri(string)

[Version("2.40")]
public Download DownloadUri(string uri)

Parameters

uri string

Returns

Download

GetCookieManager()

[Version("2.40")]
public CookieManager GetCookieManager()

Returns

CookieManager

GetDefault()

[Version("2.40")]
public static NetworkSession GetDefault()

Returns

NetworkSession

GetGType()

public static Type GetGType()

Returns

Type

GetIsEphemeral()

[Version("2.40")]
public bool GetIsEphemeral()

Returns

bool

GetItpEnabled()

[Version("2.40")]
public bool GetItpEnabled()

Returns

bool

GetItpSummaryFinish(AsyncResult)

[Version("2.40")]
public List GetItpSummaryFinish(AsyncResult result)

Parameters

result AsyncResult

Returns

List

GetPersistentCredentialStorageEnabled()

[Version("2.40")]
public bool GetPersistentCredentialStorageEnabled()

Returns

bool

GetTlsErrorsPolicy()

[Version("2.40")]
public TLSErrorsPolicy GetTlsErrorsPolicy()

Returns

TLSErrorsPolicy

GetWebsiteDataManager()

[Version("2.40")]
public WebsiteDataManager GetWebsiteDataManager()

Returns

WebsiteDataManager

New(string?, string?)

[Version("2.40")]
public static NetworkSession New(string? dataDirectory, string? cacheDirectory)

Parameters

dataDirectory string
cacheDirectory string

Returns

NetworkSession

NewEphemeral()

[Version("2.40")]
public static NetworkSession NewEphemeral()

Returns

NetworkSession

NewFromPointer(nint, bool)

Creates a new managed NetworkSession instance for a given pointer.

public static NetworkSession NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

NetworkSession

NewWithProperties(ConstructArgument[])

Creates a new NetworkSession and sets the properties specified by the construct arguments.

public static NetworkSession NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

NetworkSession

PrefetchDns(string)

[Version("2.40")]
public void PrefetchDns(string hostname)

Parameters

hostname string

SetItpEnabled(bool)

[Version("2.40")]
public void SetItpEnabled(bool enabled)

Parameters

enabled bool

SetMemoryPressureSettings(MemoryPressureSettings)

[Version("2.40")]
public static void SetMemoryPressureSettings(MemoryPressureSettings settings)

Parameters

settings MemoryPressureSettings

SetPersistentCredentialStorageEnabled(bool)

[Version("2.40")]
public void SetPersistentCredentialStorageEnabled(bool enabled)

Parameters

enabled bool

SetProxySettings(NetworkProxyMode, NetworkProxySettings?)

[Version("2.40")]
public void SetProxySettings(NetworkProxyMode proxyMode, NetworkProxySettings? proxySettings)

Parameters

proxyMode NetworkProxyMode
proxySettings NetworkProxySettings

SetTlsErrorsPolicy(TLSErrorsPolicy)

[Version("2.40")]
public void SetTlsErrorsPolicy(TLSErrorsPolicy policy)

Parameters

policy TLSErrorsPolicy

Events

OnDownloadStarted

public event SignalHandler<NetworkSession, NetworkSession.DownloadStartedSignalArgs> OnDownloadStarted

Event Type

SignalHandler<NetworkSession, NetworkSession.DownloadStartedSignalArgs>