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
constructArgumentsConstructArgument[]
NetworkSession(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected NetworkSession(CreationData data)
Parameters
dataCreationData
NetworkSession(NetworkSessionHandle)
protected NetworkSession(NetworkSessionHandle handle)
Parameters
handleNetworkSessionHandle
Fields
DownloadStartedSignal
Signal Descriptor for OnDownloadStarted.
public static readonly Signal<NetworkSession, NetworkSession.DownloadStartedSignalArgs> DownloadStartedSignal
Field Value
IsEphemeralPropertyDefinition
public static readonly Property<bool, NetworkSession> IsEphemeralPropertyDefinition
Field Value
Properties
IsEphemeral
public bool IsEphemeral { get; }
Property Value
Methods
AllowTlsCertificateForHost(TlsCertificate, string)
[Version("2.40")]
public void AllowTlsCertificateForHost(TlsCertificate certificate, string host)
Parameters
certificateTlsCertificatehoststring
DownloadUri(string)
[Version("2.40")]
public Download DownloadUri(string uri)
Parameters
uristring
Returns
GetCookieManager()
[Version("2.40")]
public CookieManager GetCookieManager()
Returns
GetDefault()
[Version("2.40")]
public static NetworkSession GetDefault()
Returns
GetGType()
public static Type GetGType()
Returns
GetIsEphemeral()
[Version("2.40")]
public bool GetIsEphemeral()
Returns
GetItpEnabled()
[Version("2.40")]
public bool GetItpEnabled()
Returns
GetItpSummaryFinish(AsyncResult)
[Version("2.40")]
public List GetItpSummaryFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
GetPersistentCredentialStorageEnabled()
[Version("2.40")]
public bool GetPersistentCredentialStorageEnabled()
Returns
GetTlsErrorsPolicy()
[Version("2.40")]
public TLSErrorsPolicy GetTlsErrorsPolicy()
Returns
GetWebsiteDataManager()
[Version("2.40")]
public WebsiteDataManager GetWebsiteDataManager()
Returns
New(string?, string?)
[Version("2.40")]
public static NetworkSession New(string? dataDirectory, string? cacheDirectory)
Parameters
Returns
NewEphemeral()
[Version("2.40")]
public static NetworkSession NewEphemeral()
Returns
NewFromPointer(nint, bool)
Creates a new managed NetworkSession instance for a given pointer.
public static NetworkSession NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new NetworkSession and sets the properties specified by the construct arguments.
public static NetworkSession NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
PrefetchDns(string)
[Version("2.40")]
public void PrefetchDns(string hostname)
Parameters
hostnamestring
SetItpEnabled(bool)
[Version("2.40")]
public void SetItpEnabled(bool enabled)
Parameters
enabledbool
SetMemoryPressureSettings(MemoryPressureSettings)
[Version("2.40")]
public static void SetMemoryPressureSettings(MemoryPressureSettings settings)
Parameters
settingsMemoryPressureSettings
SetPersistentCredentialStorageEnabled(bool)
[Version("2.40")]
public void SetPersistentCredentialStorageEnabled(bool enabled)
Parameters
enabledbool
SetProxySettings(NetworkProxyMode, NetworkProxySettings?)
[Version("2.40")]
public void SetProxySettings(NetworkProxyMode proxyMode, NetworkProxySettings? proxySettings)
Parameters
proxyModeNetworkProxyModeproxySettingsNetworkProxySettings
SetTlsErrorsPolicy(TLSErrorsPolicy)
[Version("2.40")]
public void SetTlsErrorsPolicy(TLSErrorsPolicy policy)
Parameters
policyTLSErrorsPolicy
Events
OnDownloadStarted
public event SignalHandler<NetworkSession, NetworkSession.DownloadStartedSignalArgs> OnDownloadStarted