SteamNetworkingUtils
public struct SteamNetworkingUtils: Sendable
Steamworks ISteamNetworkingUtils
Access via networkingUtils
through a SteamAPI
or SteamGameServerAPI
instance.
Topics
func allocateMessage(allocateBufferSize: Int) -> SteamNetworkingMessage
func allocateMessage(allocateBufferSize: Int) -> SteamNetworkingMessage
Steamworks ISteamNetworkingUtils::AllocateMessage()
Declaration
public func allocateMessage(allocateBufferSize: Int) -> SteamNetworkingMessage
func checkPingDataUpToDate(maxAgeSeconds: Float) -> Bool
func checkPingDataUpToDate(maxAgeSeconds: Float) -> Bool
func convertPingLocationToString(location: SteamNetworkPingLocation, bufSize: Int) -> String
func convertPingLocationToString(location: SteamNetworkPingLocation, bufSize: Int) -> String
Steamworks ISteamNetworkingUtils::ConvertPingLocationToString()
Declaration
public func convertPingLocationToString(
location: SteamNetworkPingLocation,
bufSize: Int = SteamConstants.maxSteamNetworkingPingLocationStringSize
) -> String
func estimatePingTimeBetweenTwoLocations(location1: SteamNetworkPingLocation, location2: SteamNetworkPingLocation) -> Int
func estimatePingTimeBetweenTwoLocations(location1: SteamNetworkPingLocation, location2: SteamNetworkPingLocation) -> Int
Steamworks ISteamNetworkingUtils::EstimatePingTimeBetweenTwoLocations()
Declaration
public func estimatePingTimeBetweenTwoLocations(
location1: SteamNetworkPingLocation, location2: SteamNetworkPingLocation
) -> Int
func estimatePingTimeFromLocalHost(location: SteamNetworkPingLocation) -> Int
func estimatePingTimeFromLocalHost(location: SteamNetworkPingLocation) -> Int
Steamworks ISteamNetworkingUtils::EstimatePingTimeFromLocalHost()
Declaration
public func estimatePingTimeFromLocalHost(location: SteamNetworkPingLocation)
-> Int
func getConfigValue(value: SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int, result: UnsafeMutableRawPointer?, resultSize: Int) -> (rc: SteamNetworkingGetConfigValueResult, dataType: SteamNetworkingConfigDataType, resultSize: Int)
func getConfigValue(value: SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int, result: UnsafeMutableRawPointer?, resultSize: Int) -> (rc: SteamNetworkingGetConfigValueResult, dataType: SteamNetworkingConfigDataType, resultSize: Int)
Steamworks ISteamNetworkingUtils::GetConfigValue()
Declaration
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)
func getConfigValueInfo(value: SteamNetworkingConfigValueSetting) -> (rc: String, dataType: SteamNetworkingConfigDataType, scope: SteamNetworkingConfigScope)
Steamworks ISteamNetworkingUtils::GetConfigValueInfo()
Declaration
public func getConfigValueInfo(value: SteamNetworkingConfigValueSetting) -> (
rc: String, dataType: SteamNetworkingConfigDataType,
scope: SteamNetworkingConfigScope
)
func getDirectPingToPOP(id: SteamNetworkingPOPID) -> Int
func getDirectPingToPOP(id: SteamNetworkingPOPID) -> Int
Steamworks ISteamNetworkingUtils::GetDirectPingToPOP()
Declaration
public func getDirectPingToPOP(id: SteamNetworkingPOPID) -> Int
func getIPv4FakeIPType(ipv4: Int) -> SteamNetworkingFakeIPType
func getIPv4FakeIPType(ipv4: Int) -> SteamNetworkingFakeIPType
Steamworks ISteamNetworkingUtils::GetIPv4FakeIPType()
Declaration
public func getIPv4FakeIPType(ipv4: Int) -> SteamNetworkingFakeIPType
func getLocalPingLocation() -> (rc: Float, result: SteamNetworkPingLocation)
func getLocalPingLocation() -> (rc: Float, result: SteamNetworkPingLocation)
Steamworks ISteamNetworkingUtils::GetLocalPingLocation()
Declaration
public func getLocalPingLocation() -> (
rc: Float, result: SteamNetworkPingLocation
)
func getLocalTimestamp() -> SteamNetworkingMicroseconds
func getLocalTimestamp() -> SteamNetworkingMicroseconds
Steamworks ISteamNetworkingUtils::GetLocalTimestamp()
Declaration
public func getLocalTimestamp() -> SteamNetworkingMicroseconds
func getPOPCount() -> Int
func getPOPCount() -> Int
func getPOPList(listSz: Int) -> (rc: Int, list: [SteamNetworkingPOPID])
func getPOPList(listSz: Int) -> (rc: Int, list: [SteamNetworkingPOPID])
Steamworks ISteamNetworkingUtils::GetPOPList()
Declaration
public func getPOPList(listSz: Int) -> (rc: Int, list: [SteamNetworkingPOPID])
func getPingToDataCenter(id: SteamNetworkingPOPID) -> (rc: Int, viaRelayPoP: SteamNetworkingPOPID)
func getPingToDataCenter(id: SteamNetworkingPOPID) -> (rc: Int, viaRelayPoP: SteamNetworkingPOPID)
Steamworks ISteamNetworkingUtils::GetPingToDataCenter()
Declaration
public func getPingToDataCenter(id: SteamNetworkingPOPID) -> (
rc: Int, viaRelayPoP: SteamNetworkingPOPID
)
func getRealIdentityForFakeIP(ip: SteamNetworkingIPAddr) -> (rc: Result, realIdentity: SteamNetworkingIdentity)
func getRealIdentityForFakeIP(ip: SteamNetworkingIPAddr) -> (rc: Result, realIdentity: SteamNetworkingIdentity)
Steamworks ISteamNetworkingUtils::GetRealIdentityForFakeIP()
Declaration
public func getRealIdentityForFakeIP(ip: SteamNetworkingIPAddr) -> (
rc: Result, realIdentity: SteamNetworkingIdentity
)
func getRelayNetworkStatus(returnDetails: Bool) -> (rc: SteamNetworkingAvailability, details: SteamRelayNetworkStatus)
func getRelayNetworkStatus(returnDetails: Bool) -> (rc: SteamNetworkingAvailability, details: SteamRelayNetworkStatus)
Steamworks ISteamNetworkingUtils::GetRelayNetworkStatus()
Declaration
public func getRelayNetworkStatus(returnDetails: Bool = true) -> (
rc: SteamNetworkingAvailability, details: SteamRelayNetworkStatus
)
func initRelayNetworkAccess()
func initRelayNetworkAccess()
Steamworks ISteamNetworkingUtils::InitRelayNetworkAccess()
Declaration
public func initRelayNetworkAccess()
func isFakeIPv4(ipv4: Int) -> Bool
func isFakeIPv4(ipv4: Int) -> Bool
func iterateGenericEditableConfigValues(current: SteamNetworkingConfigValueSetting, enumerateDevVars: Bool) -> SteamNetworkingConfigValueSetting
func iterateGenericEditableConfigValues(current: SteamNetworkingConfigValueSetting, enumerateDevVars: Bool) -> SteamNetworkingConfigValueSetting
Steamworks ISteamNetworkingUtils::IterateGenericEditableConfigValues()
Declaration
public func iterateGenericEditableConfigValues(
current: SteamNetworkingConfigValueSetting, enumerateDevVars: Bool
) -> SteamNetworkingConfigValueSetting
func parsePingLocationString(string: String) -> (rc: Bool, result: SteamNetworkPingLocation)
func parsePingLocationString(string: String) -> (rc: Bool, result: SteamNetworkPingLocation)
Steamworks ISteamNetworkingUtils::ParsePingLocationString()
Declaration
public func parsePingLocationString(string: String) -> (
rc: Bool, result: SteamNetworkPingLocation
)
func setConfigValue(value: SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int, dataType: SteamNetworkingConfigDataType, arg: UnsafeRawPointer) -> Bool
func setConfigValue(value: SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int, dataType: SteamNetworkingConfigDataType, arg: UnsafeRawPointer) -> Bool
Steamworks ISteamNetworkingUtils::SetConfigValue()
Declaration
@discardableResult
public func setConfigValue(
value: SteamNetworkingConfigValueSetting,
scopeType: SteamNetworkingConfigScope, obj: Int,
dataType: SteamNetworkingConfigDataType, arg: UnsafeRawPointer
) -> Bool
func setConfigValueStruct(opt: SteamNetworkingConfigValue, scopeType: SteamNetworkingConfigScope, obj: Int) -> Bool
func setConfigValueStruct(opt: SteamNetworkingConfigValue, scopeType: SteamNetworkingConfigScope, obj: Int) -> Bool
Steamworks ISteamNetworkingUtils::SetConfigValueStruct()
Declaration
@discardableResult
public func setConfigValueStruct(
opt: SteamNetworkingConfigValue, scopeType: SteamNetworkingConfigScope,
obj: Int
) -> Bool
func setConnectionConfigValueFloat(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: Float) -> Bool
func setConnectionConfigValueFloat(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: Float) -> Bool
Steamworks ISteamNetworkingUtils::SetConnectionConfigValueFloat()
Declaration
@discardableResult
public func setConnectionConfigValueFloat(
conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting,
val: Float
) -> Bool
func setConnectionConfigValueInt32(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: Int) -> Bool
func setConnectionConfigValueInt32(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: Int) -> Bool
Steamworks ISteamNetworkingUtils::SetConnectionConfigValueInt32()
Declaration
@discardableResult
public func setConnectionConfigValueInt32(
conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting,
val: Int
) -> Bool
func setConnectionConfigValueString(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: String) -> Bool
func setConnectionConfigValueString(conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting, val: String) -> Bool
Steamworks ISteamNetworkingUtils::SetConnectionConfigValueString()
Declaration
@discardableResult
public func setConnectionConfigValueString(
conn: HSteamNetConnection, value: SteamNetworkingConfigValueSetting,
val: String
) -> Bool
func setGlobalConfigValueFloat(value: SteamNetworkingConfigValueSetting, val: Float) -> Bool
func setGlobalConfigValueFloat(value: SteamNetworkingConfigValueSetting, val: Float) -> Bool
Steamworks ISteamNetworkingUtils::SetGlobalConfigValueFloat()
Declaration
@discardableResult
public func setGlobalConfigValueFloat(
value: SteamNetworkingConfigValueSetting, val: Float
) -> Bool
func setGlobalConfigValueInt32(value: SteamNetworkingConfigValueSetting, val: Int) -> Bool
func setGlobalConfigValueInt32(value: SteamNetworkingConfigValueSetting, val: Int) -> Bool
Steamworks ISteamNetworkingUtils::SetGlobalConfigValueInt32()
Declaration
@discardableResult
public func setGlobalConfigValueInt32(
value: SteamNetworkingConfigValueSetting, val: Int
) -> Bool
func setGlobalConfigValuePtr(value: SteamNetworkingConfigValueSetting, val: UnsafeMutableRawPointer) -> Bool
func setGlobalConfigValuePtr(value: SteamNetworkingConfigValueSetting, val: UnsafeMutableRawPointer) -> Bool
Steamworks ISteamNetworkingUtils::SetGlobalConfigValuePtr()
Declaration
@discardableResult
public func setGlobalConfigValuePtr(
value: SteamNetworkingConfigValueSetting, val: UnsafeMutableRawPointer
) -> Bool
func setGlobalConfigValueString(value: SteamNetworkingConfigValueSetting, val: String) -> Bool
func setGlobalConfigValueString(value: SteamNetworkingConfigValueSetting, val: String) -> Bool
Steamworks ISteamNetworkingUtils::SetGlobalConfigValueString()
Declaration
@discardableResult
public func setGlobalConfigValueString(
value: SteamNetworkingConfigValueSetting, val: String
) -> Bool
func steamNetworkingIPAddrGetFakeIPType(addr: SteamNetworkingIPAddr) -> SteamNetworkingFakeIPType
func steamNetworkingIPAddrGetFakeIPType(addr: SteamNetworkingIPAddr) -> SteamNetworkingFakeIPType
Steamworks ISteamNetworkingUtils::SteamNetworkingIPAddr_GetFakeIPType()
Declaration
public func steamNetworkingIPAddrGetFakeIPType(addr: SteamNetworkingIPAddr)
-> SteamNetworkingFakeIPType
func setListenSocketConfigValueFloat(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Float) -> Bool
func setListenSocketConfigValueFloat(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Float) -> Bool
Steamworks ISteamNetworkingUtils::SetListenSocketConfigValueFloat()
Declaration
@discardableResult
public func setListenSocketConfigValueFloat(
sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting,
val: Float
) -> Bool
func setListenSocketConfigValueInt32(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Int) -> Bool
func setListenSocketConfigValueInt32(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Int) -> Bool
Steamworks ISteamNetworkingUtils::SetListenSocketConfigValueInt32()
Declaration
@discardableResult
public func setListenSocketConfigValueInt32(
sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: Int
) -> Bool
func setListenSocketConfigValueString(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: String) -> Bool
func setListenSocketConfigValueString(sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting, val: String) -> Bool
Steamworks ISteamNetworkingUtils::SetListenSocketConfigValueString()
Declaration
@discardableResult
public func setListenSocketConfigValueString(
sock: HSteamListenSocket, value: SteamNetworkingConfigValueSetting,
val: String
) -> Bool
func getConfigValueFloat(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Float)
func getConfigValueFloat(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Float)
Declaration
public func getConfigValueFloat(
_ value: SteamNetworkingConfigValueSetting,
scopeType: SteamNetworkingConfigScope, obj: Int
) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Float)
func getConfigValueInt(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Int)
func getConfigValueInt(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Int)
Declaration
public func getConfigValueInt(
_ value: SteamNetworkingConfigValueSetting,
scopeType: SteamNetworkingConfigScope, obj: Int
) -> (rc: SteamNetworkingGetConfigValueResult, outValue: Int)
func getConfigValueString(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: String)
func getConfigValueString(SteamNetworkingConfigValueSetting, scopeType: SteamNetworkingConfigScope, obj: Int) -> (rc: SteamNetworkingGetConfigValueResult, outValue: String)
Declaration
public func getConfigValueString(
_ value: SteamNetworkingConfigValueSetting,
scopeType: SteamNetworkingConfigScope, obj: Int
) -> (rc: SteamNetworkingGetConfigValueResult, outValue: String)
func useLoggerForDebug(detailLevel: SteamNetworkingSocketsDebugOutputType)
func useLoggerForDebug(detailLevel: SteamNetworkingSocketsDebugOutputType)
Use ISteamNetworkingUtils::SetDebugOutputFunction()
to send networking debug tracing
through the SteamBaseAPI/logger
logger.
Declaration
public func useLoggerForDebug(
detailLevel: SteamNetworkingSocketsDebugOutputType)
func getPOPList() -> (rc: Int, list: [SteamNetworkingPOPID])
func getPOPList() -> (rc: Int, list: [SteamNetworkingPOPID])
Provided by module SteamworksHelpers
.
Steamworks ISteamNetworkingUtils::GetPOPList()
Declaration
public func getPOPList() -> (rc: Int, list: [SteamNetworkingPOPID])