Transmit
boolean CBaseClient:Transmit( boolean onlyReliable = false, number fragments = -1, boolean freeSubChannels = false )
Description
Transmit any pending data to the client.
Returns true
on success.
This function errors if the client doesn't have a valid
CNetChannel
Transmitting data to the client causes the client's prediction to reset and cause prediction errors!
Recently Changed
This was recently changed in version (0.8 - DEV).
The second argument fragments
was removed
Arguments
2number fragments = -1
Number of fragments to use.
the engine by default uses only 4
fragments (depends on net_maxfragments
& raising it increases the number of fragments)
You can use up to 7
fragments at once as the engine doesn't support more.
Using more fragments increases the networking speed at no cost.
3boolean freeSubChannels = false
Each CNetChannel
has 8
sub channels for networking, on every transmit it uses a single sub channel and sends data.
The used sub channel is marked as used and the server waits until the client sends a signal that the sub channel data was received
This argument causes all sub channels to be marked as free instantly after this transmit, making networking possibly unreliable but allowing for far greater speeds.
Returns
Example
Exampe usage of this function