Fix SendRateMin and SendRateMin behaviour and documentation.

The documentation was, uh, aspirational.  Eventually I'd like to have it work
that way, but until we have bandwidth estimation the current behaviour was
really pretty busted.

This fixes #270
This commit is contained in:
Fletcher Dunn
2023-05-28 12:54:25 -07:00
parent 63a743359a
commit ae2ef79037
2 changed files with 8 additions and 5 deletions
+6 -3
View File
@@ -1206,9 +1206,12 @@ enum ESteamNetworkingConfigValue
// ensure you have the current value.
k_ESteamNetworkingConfig_ConnectionUserData = 40,
/// [connection int32] Minimum/maximum send rate clamp, 0 is no limit.
/// This value will control the min/max allowed sending rate that
/// bandwidth estimation is allowed to reach. Default is 0 (no-limit)
/// [connection int32] Minimum/maximum send rate clamp, in bytes/sec.
/// At the time of this writing these two options should always be set to
/// the same value, to manually configure a specific send rate. The default
/// value is 256K. Eventually we hope to have the library estimate the bandwidth
/// of the channel and set the send rate to that estimated bandwidth, and these
/// values will only set limits on that send rate.
k_ESteamNetworkingConfig_SendRateMin = 10,
k_ESteamNetworkingConfig_SendRateMax = 11,
@@ -74,8 +74,8 @@ DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, RecvBufferMessages, 1000, 2, 0x100000
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, RecvMaxMessageSize, 512*1024, 64, 0x10000000 );
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, RecvMaxSegmentsPerPacket, k_cbSteamNetworkingSocketsMaxUDPMsgLen, 1, k_cbSteamNetworkingSocketsMaxUDPMsgLen );
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int64, ConnectionUserData, -1 ); // no limits here
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, SendRateMin, 128*1024, 1024, 0x10000000 );
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, SendRateMax, 1024*1024, 1024, 0x10000000 );
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, SendRateMin, 256*1024, 1024, 0x10000000 );
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, SendRateMax, 256*1024, 1024, 0x10000000 );
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, NagleTime, 5000, 0, 20000 );
DEFINE_CONNECTON_DEFAULT_CONFIGVAL( int32, MTU_PacketSize, 1300, k_cbSteamNetworkingSocketsMinMTUPacketSize, k_cbSteamNetworkingSocketsMaxUDPMsgLen );
#ifdef STEAMNETWORKINGSOCKETS_OPENSOURCE