Added so you can increase the amount of packets per update in file sender

This commit is contained in:
Evil Factory
2022-04-25 16:45:05 -03:00
parent 27ec9f4928
commit 60ddfb831b
2 changed files with 7 additions and 1 deletions
@@ -52,7 +52,7 @@ namespace Barotrauma.Networking
} }
} }
public const int MaxPacketsPerUpdate = 4; public static int MaxPacketsPerUpdate = 4;
public float PacketsPerUpdate { get; set; } = 1.0f; public float PacketsPerUpdate { get; set; } = 1.0f;
public byte[] Data { get; } public byte[] Data { get; }
@@ -395,6 +395,12 @@ namespace Barotrauma
{ {
GameMain.Server.ServerPeer.RemovePendingClient(pendingClient, reason, msg); GameMain.Server.ServerPeer.RemovePendingClient(pendingClient, reason, msg);
} }
public int FileSenderMaxPacketsPerUpdate
{
get { return FileSender.FileTransferOut.MaxPacketsPerUpdate; }
set { FileSender.FileTransferOut.MaxPacketsPerUpdate = value; }
}
#endif #endif