SteamNetworkingUtils

Swift
public struct SteamNetworkingUtils: Sendable

Steamworks ISteamNetworkingUtils

Access via networkingUtils through a SteamAPI or SteamGameServerAPI instance.


Topics

func allocateMessage(allocateBufferSize: Int) -> SteamNetworkingMessage

Steamworks ISteamNetworkingUtils::AllocateMessage()

Declaration
Swift
public func allocateMessage(allocateBufferSize: Int) -> SteamNetworkingMessage

func checkPingDataUpToDate(maxAgeSeconds: Float) -> Bool

Steamworks ISteamNetworkingUtils::CheckPingDataUpToDate()

Declaration
Swift
public func checkPingDataUpToDate(maxAgeSeconds: Float) -> Bool

func convertPingLocationToString(location: SteamNetworkPingLocation, bufSize: Int) -> String

Steamworks ISteamNetworkingUtils::ConvertPingLocationToString()

Declaration
Swift
public func convertPingLocationToString(
    location: SteamNetworkPingLocation,
    bufSize: Int = SteamConstants.maxSteamNetworkingPingLocationStringSize
) -> String

func estimatePingTimeBetweenTwoLocations(location1: SteamNetworkPingLocation, location2: SteamNetworkPingLocation) -> Int

Steamworks ISteamNetworkingUtils::EstimatePingTimeBetweenTwoLocations()

Declaration
Swift
public func estimatePingTimeBetweenTwoLocations(
    location1: SteamNetworkPingLocation, location2: SteamNetworkPingLocation
) -> Int

func estimatePingTimeFromLocalHost(location: SteamNetworkPingLocation) -> Int

Steamworks ISteamNetworkingUtils::EstimatePingTimeFromLocalHost()

Declaration
Swift
public func estimatePingTimeFromLocalHost(location: SteamNetworkPingLocation)
    -> Int

func getConfigValue(value: SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int, result: UnsafeMutableRawPointer?, resultSize: Int) -> (rc: SteamNetworkingGetConfigValueResult, dataType: SteamNetworkingConfigDataType, resultSize: Int)

Steamworks ISteamNetworkingUtils::GetConfigValue()

Declaration
Swift
public func getConfigValue(
    value: SteamNetworkingConfigValueSetting,
    scopeType: SteamNetworkingConfigScope, obj: Int,
    result: UnsafeMutableRawPointer?, resultSize: Int
) -> (
    rc: SteamNetworkingGetConfigValueResult,
    dataType: SteamNetworkingConfigDataType, resultSize: Int
)

func getConfigValueInfo(value: SteamNetworkingConfigValueSetting) -> (rc: String, dataType: SteamNetworkingConfigDataType, scope: SteamNetworkingConfigScope)

Steamworks ISteamNetworkingUtils::GetConfigValueInfo()

Declaration
Swift
public func getConfigValueInfo(value: SteamNetworkingConfigValueSetting) -> (
    rc: String, dataType: SteamNetworkingConfigDataType,
    scope: SteamNetworkingConfigScope
)

func getDirectPingToPOP(id: SteamNetworkingPOPID) -> Int

Steamworks ISteamNetworkingUtils::GetDirectPingToPOP()

Declaration
Swift
public func getDirectPingToPOP(id: SteamNetworkingPOPID) -> Int

func getIPv4FakeIPType(ipv4: Int) -> SteamNetworkingFakeIPType

Steamworks ISteamNetworkingUtils::GetIPv4FakeIPType()

Declaration
Swift
public func getIPv4FakeIPType(ipv4: Int) -> SteamNetworkingFakeIPType

func getLocalPingLocation() -> (rc: Float, result: SteamNetworkPingLocation)

Steamworks ISteamNetworkingUtils::GetLocalPingLocation()

Declaration
Swift
public func getLocalPingLocation() -> (
    rc: Float, result: SteamNetworkPingLocation
)

func getLocalTimestamp() -> SteamNetworkingMicroseconds

Steamworks ISteamNetworkingUtils::GetLocalTimestamp()

Declaration
Swift
public func getLocalTimestamp() -> SteamNetworkingMicroseconds

func getPOPCount() -> Int

Steamworks ISteamNetworkingUtils::GetPOPCount()

Declaration
Swift
public func getPOPCount() -> Int

func getPOPList(listSz: Int) -> (rc: Int, list: [SteamNetworkingPOPID])

Steamworks ISteamNetworkingUtils::GetPOPList()

Declaration
Swift
public func getPOPList(listSz: Int) -> (rc: Int, list: [SteamNetworkingPOPID])

func getPingToDataCenter(id: SteamNetworkingPOPID) -> (rc: Int, viaRelayPoP: SteamNetworkingPOPID)

Steamworks ISteamNetworkingUtils::GetPingToDataCenter()

Declaration
Swift
public func getPingToDataCenter(id: SteamNetworkingPOPID) -> (
    rc: Int, viaRelayPoP: SteamNetworkingPOPID
)

func getRealIdentityForFakeIP(ip: SteamNetworkingIPAddr) -> (rc: Result, realIdentity: SteamNetworkingIdentity)

Steamworks ISteamNetworkingUtils::GetRealIdentityForFakeIP()

Declaration
Swift
public func getRealIdentityForFakeIP(ip: SteamNetworkingIPAddr) -> (
    rc: Result, realIdentity: SteamNetworkingIdentity
)

func getRelayNetworkStatus(returnDetails: Bool) -> (rc: SteamNetworkingAvailability, details: SteamRelayNetworkStatus)

Steamworks ISteamNetworkingUtils::GetRelayNetworkStatus()

Declaration
Swift
public func getRelayNetworkStatus(returnDetails: Bool = true) -> (
    rc: SteamNetworkingAvailability, details: SteamRelayNetworkStatus
)

func initRelayNetworkAccess()

Steamworks ISteamNetworkingUtils::InitRelayNetworkAccess()

Declaration
Swift
public func initRelayNetworkAccess()

func isFakeIPv4(ipv4: Int) -> Bool

Steamworks ISteamNetworkingUtils::IsFakeIPv4()

Declaration
Swift
public func isFakeIPv4(ipv4: Int) -> Bool

func iterateGenericEditableConfigValues(current: SteamNetworkingConfigValueSetting, enumerateDevVars: Bool) -> SteamNetworkingConfigValueSetting

Steamworks ISteamNetworkingUtils::IterateGenericEditableConfigValues()

Declaration
Swift
public func iterateGenericEditableConfigValues(
    current: SteamNetworkingConfigValueSetting, enumerateDevVars: Bool
) -> SteamNetworkingConfigValueSetting

func parsePingLocationString(string: String) -> (rc: Bool, result: SteamNetworkPingLocation)

Steamworks ISteamNetworkingUtils::ParsePingLocationString()

Declaration
Swift
public func parsePingLocationString(string: String) -> (
    rc: Bool, result: SteamNetworkPingLocation
)

func setConfigValue(value: SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int, dataType: SteamNetworkingConfigDataType, arg: UnsafeRawPointer) -> Bool

Steamworks ISteamNetworkingUtils::SetConfigValue()

Declaration
Swift
@discardableResult
public func setConfigValue(
    value: SteamNetworkingConfigValueSetting,
    scopeType: SteamNetworkingConfigScope, obj: Int,
    dataType: SteamNetworkingConfigDataType, arg: UnsafeRawPointer
) -> Bool

func setConfigValueStruct(opt: SteamNetworkingConfigValue, scopeType: SteamNetworkingConfigScope, obj: Int) -> Bool

Steamworks ISteamNetworkingUtils::SetConfigValueStruct()

Declaration
Swift
@discardableResult
public func setConfigValueStruct(
    opt: SteamNetworkingConfigValue, scopeType: SteamNetworkingConfigScope,
    obj: Int
) -> Bool

func setConnectionConfigValueFloat(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: Float) -> Bool

Steamworks ISteamNetworkingUtils::SetConnectionConfigValueFloat()

Declaration
Swift
@discardableResult
public func setConnectionConfigValueFloat(
    conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting,
    val: Float
) -> Bool

func setConnectionConfigValueInt32(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: Int) -> Bool

Steamworks ISteamNetworkingUtils::SetConnectionConfigValueInt32()

Declaration
Swift
@discardableResult
public func setConnectionConfigValueInt32(
    conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting,
    val: Int
) -> Bool

func setConnectionConfigValueString(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: String) -> Bool

Steamworks ISteamNetworkingUtils::SetConnectionConfigValueString()

Declaration
Swift
@discardableResult
public func setConnectionConfigValueString(
    conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting,
    val: String
) -> Bool

func setGlobalConfigValueFloat(value: SteamNetworkingConfigValueSetting, val: Float) -> Bool

Steamworks ISteamNetworkingUtils::SetGlobalConfigValueFloat()

Declaration
Swift
@discardableResult
public func setGlobalConfigValueFloat(
    value: SteamNetworkingConfigValueSetting, val: Float
) -> Bool

func setGlobalConfigValueInt32(value: SteamNetworkingConfigValueSetting, val: Int) -> Bool

Steamworks ISteamNetworkingUtils::SetGlobalConfigValueInt32()

Declaration
Swift
@discardableResult
public func setGlobalConfigValueInt32(
    value: SteamNetworkingConfigValueSetting, val: Int
) -> Bool

func setGlobalConfigValuePtr(value: SteamNetworkingConfigValueSetting, val: UnsafeMutableRawPointer) -> Bool

Steamworks ISteamNetworkingUtils::SetGlobalConfigValuePtr()

Declaration
Swift
@discardableResult
public func setGlobalConfigValuePtr(
    value: SteamNetworkingConfigValueSetting, val: UnsafeMutableRawPointer
) -> Bool

func setGlobalConfigValueString(value: SteamNetworkingConfigValueSetting, val: String) -> Bool

Steamworks ISteamNetworkingUtils::SetGlobalConfigValueString()

Declaration
Swift
@discardableResult
public func setGlobalConfigValueString(
    value: SteamNetworkingConfigValueSetting, val: String
) -> Bool

func steamNetworkingIPAddrGetFakeIPType(addr: SteamNetworkingIPAddr) -> SteamNetworkingFakeIPType

Steamworks ISteamNetworkingUtils::SteamNetworkingIPAddr_GetFakeIPType()

Declaration
Swift
public func steamNetworkingIPAddrGetFakeIPType(addr: SteamNetworkingIPAddr)
    -> SteamNetworkingFakeIPType

func setListenSocketConfigValueFloat(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Float) -> Bool

Steamworks ISteamNetworkingUtils::SetListenSocketConfigValueFloat()

Declaration
Swift
@discardableResult
public func setListenSocketConfigValueFloat(
    sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting,
    val: Float
) -> Bool

func setListenSocketConfigValueInt32(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Int) -> Bool

Steamworks ISteamNetworkingUtils::SetListenSocketConfigValueInt32()

Declaration
Swift
@discardableResult
public func setListenSocketConfigValueInt32(
    sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Int
) -> Bool

func setListenSocketConfigValueString(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: String) -> Bool

Steamworks ISteamNetworkingUtils::SetListenSocketConfigValueString()

Declaration
Swift
@discardableResult
public func setListenSocketConfigValueString(
    sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting,
    val: String
) -> Bool

func getConfigValueFloat(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Float)

Steamworks ISteamNetworkingUtils::GetConfigValue() for FloatFloat

Declaration
Swift
public func getConfigValueFloat(
    _ value: SteamNetworkingConfigValueSetting,
    scopeType: SteamNetworkingConfigScope, obj: Int
) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Float)

func getConfigValueInt(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Int)

Steamworks ISteamNetworkingUtils::GetConfigValue() for IntInt

Declaration
Swift
public func getConfigValueInt(
    _ value: SteamNetworkingConfigValueSetting,
    scopeType: SteamNetworkingConfigScope, obj: Int
) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Int)

func getConfigValueString(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: String)

Steamworks ISteamNetworkingUtils::GetConfigValue() for StringString

Declaration
Swift
public func getConfigValueString(
    _ value: SteamNetworkingConfigValueSetting,
    scopeType: SteamNetworkingConfigScope, obj: Int
) -> (rc: SteamNetworkingGetConfigValueResult, outValue: String)

func useLoggerForDebug(detailLevel: SteamNetworkingSocketsDebugOutputType)

Use ISteamNetworkingUtils::SetDebugOutputFunction() to send networking debug tracing through the logger logger.

Declaration
Swift
public func useLoggerForDebug(
    detailLevel: SteamNetworkingSocketsDebugOutputType)

func getPOPList() -> (rc: Int, list: [SteamNetworkingPOPID])

Note

Provided by module SteamworksHelpers.

Steamworks ISteamNetworkingUtils::GetPOPList()

Declaration
Swift
public func getPOPList() -> (rc: Int, list: [SteamNetworkingPOPID])