Player::SetFileChunkParams
Defined in:
Returns the number of packets sent at one time during a file transfer.
C4Messages.h
Prototype
void SetFileChunkParams(uint32 size, int32 count);
Parameters
size |
The maximum size of each packet. This value is clamped to the constant kMaxFileChunkSize .
|
count |
The number of packets sent at one time. |
Description
During a file transfer, several data packets, or "chunks", are sent to the receiving machine at one time. Each chunk is the same size (unless it's the last chunk to be sent). Once the receiving machine has acknowledged all of the outstanding packets, the same number of packets is sent again, and the process repeats until the entire file has been transmitted.The
SetFileChunkParams
function sets the size of the data packets and the number of data packets that are sent at one time. Noisey connections may benefit from a smaller chunk size because this may reduce packet loss. The chunk count should be determined by the available bandwidth. Low bandwidth connections should use a low chunk count to avoid adversely affecting other communications.
See Also