SteamNetworkingIdentity
Swift
public struct SteamNetworkingIdentity: Sendable
extension SteamNetworkingIdentity: SteamCreatable, CustomStringConvertible,
Equatable
Steamworks SteamNetworkingIdentity
Topics
Fields
var type: SteamNetworkingIdentityType
var type: SteamNetworkingIdentityType
var isValid: Bool
var isValid: Bool
Returns true if we are the invalid type. Does not make any other validity checks (e.g. is Steam ID actually valid)
Declaration
Swift
public var isValid: Bool { get }
var steamID: SteamID
var steamID: SteamID
Returns CSteamID (!IsValid() if identity is not a SteamID)
Declaration
Swift
public var steamID: SteamID { get }
var ipAddr: SteamNetworkingIPAddr?
var ipAddr: SteamNetworkingIPAddr?
Returns nil
if we are not an IP address.
Declaration
Swift
public var ipAddr: SteamNetworkingIPAddr? { get }
var isLocalhost: Bool
var isLocalhost: Bool
var fakeIPType: SteamNetworkingFakeIPType
var fakeIPType: SteamNetworkingFakeIPType
var isFakeIP: Bool
var isFakeIP: Bool
var genericString: String?
var genericString: String?
var genericBytes: [UInt8]?
var genericBytes: [UInt8]?
var description: String
var description: String
Initializers
init()
init()
Create an invalid identity
Declaration
Swift
public init()
init(SteamID)
init(SteamID)
init(SteamNetworkingIPAddr)
init(SteamNetworkingIPAddr)
static var localhost: SteamNetworkingIdentity
static var localhost: SteamNetworkingIdentity
Identify as localhost, ~anonymous
Declaration
Swift
public static var localhost: SteamNetworkingIdentity { get }
init?(genericString: String, type: SteamNetworkingIdentityType)
init?(genericString: String, type: SteamNetworkingIdentityType)
Init generic string or some other type. Max length 31 bytes.
Declaration
Swift
public init?(
genericString: String, type: SteamNetworkingIdentityType = .genericString)
init?(description: String)
init?(description: String)
init?([UInt8], type: SteamNetworkingIdentityType)
init?([UInt8], type: SteamNetworkingIdentityType)
Init generic bytes or some other type. Max 32 bytes.
Declaration
Swift
public init?(
_ bytes: [UInt8], type: SteamNetworkingIdentityType = .genericBytes)
SteamNetworkingIdentity
static func ==(lhs: SteamNetworkingIdentity, rhs: SteamNetworkingIdentity) -> Bool
static func ==(lhs: SteamNetworkingIdentity, rhs: SteamNetworkingIdentity) -> Bool
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values a
and b
, a == b
implies that a != b
is false
.
Declaration
Swift
public static func == (
lhs: SteamNetworkingIdentity, rhs: SteamNetworkingIdentity
) -> Bool
Parameters
lhs |
A value to compare. |
rhs |
Another value to compare. |