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
constructArgumentsConstructArgument[]
NetworkAddress(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected NetworkAddress(CreationData data)
Parameters
dataCreationData
NetworkAddress(NetworkAddressHandle)
protected NetworkAddress(NetworkAddressHandle handle)
Parameters
handleNetworkAddressHandle
Fields
HostnamePropertyDefinition
public static readonly Property<string?, NetworkAddress> HostnamePropertyDefinition
Field Value
PortPropertyDefinition
public static readonly Property<uint, NetworkAddress> PortPropertyDefinition
Field Value
SchemePropertyDefinition
public static readonly Property<string?, NetworkAddress> SchemePropertyDefinition
Field Value
Properties
Hostname
public string? Hostname { get; }
Property Value
Port
public uint Port { get; }
Property Value
Scheme
public string? Scheme { get; }
Property Value
Methods
Enumerate()
[Version("2.22")]
public SocketAddressEnumerator Enumerate()
Returns
GetGType()
public static Type GetGType()
Returns
GetHostname()
[Version("2.22")]
public string GetHostname()
Returns
GetPort()
[Version("2.22")]
public ushort GetPort()
Returns
GetScheme()
[Version("2.26")]
public string? GetScheme()
Returns
New(string, ushort)
[Version("2.22")]
public static NetworkAddress New(string hostname, ushort port)
Parameters
Returns
NewFromPointer(nint, bool)
Creates a new managed NetworkAddress instance for a given pointer.
public static NetworkAddress NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewLoopback(ushort)
[Version("2.44")]
public static NetworkAddress NewLoopback(ushort port)
Parameters
portushort
Returns
NewWithProperties(ConstructArgument[])
Creates a new NetworkAddress and sets the properties specified by the construct arguments.
public static NetworkAddress NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
Parse(string, ushort)
[Version("2.22")]
public static SocketConnectable Parse(string hostAndPort, ushort defaultPort)
Parameters
Returns
ParseUri(string, ushort)
[Version("2.26")]
public static SocketConnectable ParseUri(string uri, ushort defaultPort)
Parameters
Returns
ProxyEnumerate()
[Version("2.26")]
public SocketAddressEnumerator ProxyEnumerate()
Returns
ToString()
[Version("2.48")]
public string ToString()