Table of Contents

Class NetworkAddress

Namespace
Gio
Assembly
Gio-2.0.dll
public class NetworkAddress : Object, SocketConnectable, NativeObject, IDisposable, GTypeProvider, InstanceFactory
Inheritance
NetworkAddress
Implements
Inherited Members

Constructors

NetworkAddress(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 NetworkAddress(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

NetworkAddress(CreationData)

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

Parameters

data CreationData

NetworkAddress(NetworkAddressHandle)

protected NetworkAddress(NetworkAddressHandle handle)

Parameters

handle NetworkAddressHandle

Fields

HostnamePropertyDefinition

public static readonly Property<string?, NetworkAddress> HostnamePropertyDefinition

Field Value

Property<string, NetworkAddress>

PortPropertyDefinition

public static readonly Property<uint, NetworkAddress> PortPropertyDefinition

Field Value

Property<uint, NetworkAddress>

SchemePropertyDefinition

public static readonly Property<string?, NetworkAddress> SchemePropertyDefinition

Field Value

Property<string, NetworkAddress>

Properties

Hostname

public string? Hostname { get; }

Property Value

string

Port

public uint Port { get; }

Property Value

uint

Scheme

public string? Scheme { get; }

Property Value

string

Methods

Enumerate()

[Version("2.22")]
public SocketAddressEnumerator Enumerate()

Returns

SocketAddressEnumerator

GetGType()

public static Type GetGType()

Returns

Type

GetHostname()

[Version("2.22")]
public string GetHostname()

Returns

string

GetPort()

[Version("2.22")]
public ushort GetPort()

Returns

ushort

GetScheme()

[Version("2.26")]
public string? GetScheme()

Returns

string

New(string, ushort)

[Version("2.22")]
public static NetworkAddress New(string hostname, ushort port)

Parameters

hostname string
port ushort

Returns

NetworkAddress

NewFromPointer(nint, bool)

Creates a new managed NetworkAddress instance for a given pointer.

public static NetworkAddress NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

NetworkAddress

NewLoopback(ushort)

[Version("2.44")]
public static NetworkAddress NewLoopback(ushort port)

Parameters

port ushort

Returns

NetworkAddress

NewWithProperties(ConstructArgument[])

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

public static NetworkAddress NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

NetworkAddress

Parse(string, ushort)

[Version("2.22")]
public static SocketConnectable Parse(string hostAndPort, ushort defaultPort)

Parameters

hostAndPort string
defaultPort ushort

Returns

SocketConnectable

ParseUri(string, ushort)

[Version("2.26")]
public static SocketConnectable ParseUri(string uri, ushort defaultPort)

Parameters

uri string
defaultPort ushort

Returns

SocketConnectable

ProxyEnumerate()

[Version("2.26")]
public SocketAddressEnumerator ProxyEnumerate()

Returns

SocketAddressEnumerator

ToString()

[Version("2.48")]
public string ToString()

Returns

string