Facepunch.Steamworks Wiki

Steamworks.SteamNetworkingUtils

Undocumented Parental Settings

Events

static event Action<NetDebugOutput, string> OnDebugOutput
A function to receive debug network information on. This will do nothing unless you set DebugLevel to something other than None. You should set this to an appropriate level instead of setting it to the highest and then filtering it by hand because a lot of energy is used by creating the strings and your frame rate will tank and you won't know why.

Properties

static int ConnectionTimeout { get; set; }
Timeout value (in ms) to use when first connecting
static NetDebugOutput DebugLevel { get; set; }
Get Debug Information via OnDebugOutput event Except when debugging, you should only use NetDebugOutput.Msg or NetDebugOutput.Warning. For best performance, do NOT request a high detail level and then filter out messages in the callback. This incurs all of the expense of formatting the messages, which are then discarded. Setting a high priority value (low numeric value) here allows the library to avoid doing this work.
static float FakeRecvPacketLag { get; set; }
Delay all packets by N ms
static float FakeRecvPacketLoss { get; set; }
[0 - 100] - Randomly discard N pct of packets
static float FakeSendPacketLag { get; set; }
Delay all packets by N ms
static float FakeSendPacketLoss { get; set; }
[0 - 100] - Randomly discard N pct of packets
static Data.NetPingLocation? LocalPingLocation { get; }
Return location info for the current host. It takes a few seconds to initialize access to the relay network. If you call this very soon after startup the data may not be available yet. This always return the most up-to-date information we have available right now, even if we are in the middle of re-calculating ping times.
static System.Int64 LocalTimestamp { get; }
static int SendBufferSize { get; set; }
Upper limit of buffered pending bytes to be sent. If this is reached SendMessage will return LimitExceeded. Default is 524288 bytes (512k)
static SteamNetworkingAvailability Status { get; }
The latest available status gathered from the SteamRelayNetworkStatus callback
static int Timeout { get; set; }
Timeout value (in ms) to use after connection is established

Methods

static int EstimatePingTo( Data.NetPingLocation target )
Same as PingLocation.EstimatePingTo, but assumes that one location is the local host. This is a bit faster, especially if you need to calculate a bunch of these in a loop to find the fastest one.
static void InitRelayNetworkAccess()
If you know that you are going to be using the relay network (for example, because you anticipate making P2P connections), call this to initialize the relay network. If you do not call this, the initialization will be delayed until the first time you use a feature that requires access to the relay network, which will delay that first access. You can also call this to force a retry if the previous attempt has failed. Performing any action that requires access to the relay network will also trigger a retry..
static async Task WaitForPingDataAsync( float maxAgeInSeconds = 300 )
If you need ping information straight away, wait on this. It will return immediately if you already have up to date ping data

Page Links


Special Pages


Wikis

?

Render Time: 59ms

DB GetPage 44
Generate Html 0
SaveChanges (1) 10
Render Body 0
Render Sidebar 1