This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SENDING_DATA = false | |
function net.SendChunk(id, data, ply, callback, max, rate) | |
max = max or (2^16-2^10)-1 | |
rate = rate or 1/4 | |
assert(not SENDING_DATA) | |
SENDING_DATA = true | |
local chunk_count = math.ceil(string.len(data) / max) |