mirror of
https://github.com/XeonSquared/OC-Copper.git
synced 2024-11-23 09:58:06 +11:00
Update culib.lua
This commit is contained in:
parent
de672239be
commit
3da01661ba
@ -55,7 +55,7 @@ return function (hostname, transmit, onReceive, time)
|
|||||||
local tuningFlushLoopDetector = 60
|
local tuningFlushLoopDetector = 60
|
||||||
|
|
||||||
-- Do not change this value unless protocol has changed accordingly.
|
-- Do not change this value unless protocol has changed accordingly.
|
||||||
local tuningAutorejectLen = 1506
|
local tuningAutorejectLen = 1507
|
||||||
|
|
||||||
local loopDetectorNext = time() + tuningFlushLoopDetector
|
local loopDetectorNext = time() + tuningFlushLoopDetector
|
||||||
|
|
||||||
@ -187,6 +187,7 @@ return function (hostname, transmit, onReceive, time)
|
|||||||
end
|
end
|
||||||
culib.refresh = refresh
|
culib.refresh = refresh
|
||||||
culib.output = function (fnam, tnam, message)
|
culib.output = function (fnam, tnam, message)
|
||||||
|
if message:len() > tuningAutorejectLen then error("Attempted to send too long packet") end
|
||||||
onReceive(fnam, tnam, message)
|
onReceive(fnam, tnam, message)
|
||||||
if tnam == culib.hostname then return end
|
if tnam == culib.hostname then return end
|
||||||
local m = cdlib.encode(0, fnam, tnam, message)
|
local m = cdlib.encode(0, fnam, tnam, message)
|
||||||
|
Loading…
Reference in New Issue
Block a user