SteamIPAddress

Swift
public final class SteamIPAddress

extension SteamIPAddress: Sendable, Hashable

Steamworks SteamIPAddress_t


Topics

Properties

var type: SteamIPType

The address family

Declaration
Swift
public var type: SteamIPType { get }

var ipv4Address: Int

Four bytes, host order

Declaration
Swift
public var ipv4Address: Int { get }

var ipv6Address: [UInt8]

SIxteen bytes, network order

Declaration
Swift
public var ipv6Address: [UInt8] { get }

var isSet: Bool

Is the IP address possibly valid?

Declaration
Swift
public var isSet: Bool { get }

Initializers

init(ipv4Address: Int)

Initialize with an IPv4 address.

Declaration
Swift
public init(ipv4Address: Int)

init(ipv6Address: [UInt8])

Initialize with an IPv6 address

Declaration
Swift
public init(ipv6Address: [UInt8])

Conformances

static func ==(lhs: SteamIPAddress, rhs: SteamIPAddress) -> Bool

Simple equality, no thinking about IPv4 expressed in IPv6…

Declaration
Swift
public static func == (lhs: SteamIPAddress, rhs: SteamIPAddress) -> Bool

func hash(into: inout Hasher)

Use SteamIPAddress as a dictionary key.

Declaration
Swift
public func hash(into hasher: inout Hasher)