HolyLib Wiki

SetMaxBufferSize

  CBaseClient:SetMaxBufferSize( boolean reliable = false, number bytes, boolean voice = false )

Description

Resizes the specified buffer to the given size in bytes.

This function errors if the client doesn't have a valid CNetChannel
All data inside that stream is discarded, make sure everything was sent out.

Arguments

1boolean reliable = false
true if the reliable stream should be modified, false if the unreliable stream should be modified
2number bytes
number if bytes to resize to
3boolean voice = false
true if the voice stream should be modified

Example

Exampe usage of this function
concommand.Add("biggerBuffer", function(ply) local client = gameserver.GetClient(ply:EntIndex()-1) client:Transmit() -- Send everything out or else we lose data client:SetMaxBufferSize(true, 524288) -- We resize the reliable stream end)