mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 10:38:05 +11:00
add variable for amount of retries for #6
This commit is contained in:
parent
4aba85513a
commit
a7b2d2c012
@ -22,6 +22,7 @@ local dbug = false
|
|||||||
local modems = {}
|
local modems = {}
|
||||||
local port = 4096
|
local port = 4096
|
||||||
local retry = 10
|
local retry = 10
|
||||||
|
local retrycount = 64
|
||||||
local route = true
|
local route = true
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
@ -188,7 +189,7 @@ function start()
|
|||||||
if v[5] < computer.uptime() then
|
if v[5] < computer.uptime() then
|
||||||
dprint(k,v[1],v[2],hostname,v[3],v[4])
|
dprint(k,v[1],v[2],hostname,v[3],v[4])
|
||||||
sendPacket(k,v[1],v[2],hostname,v[3],v[4])
|
sendPacket(k,v[1],v[2],hostname,v[3],v[4])
|
||||||
if v[1] ~= 1 or v[6] == 255 then
|
if v[1] ~= 1 or v[6] == retrycount then
|
||||||
pqueue[k] = nil
|
pqueue[k] = nil
|
||||||
else
|
else
|
||||||
pqueue[k][5]=computer.uptime()+retry
|
pqueue[k][5]=computer.uptime()+retry
|
||||||
@ -223,6 +224,10 @@ function set_retry(sn)
|
|||||||
retry = tonumber(sn) or 30
|
retry = tonumber(sn) or 30
|
||||||
print("retry = "..tostring(retry))
|
print("retry = "..tostring(retry))
|
||||||
end
|
end
|
||||||
|
function set_retrycount(sn)
|
||||||
|
retrycount = tonumber(sn) or 64
|
||||||
|
print("retrycount = "..tostring(retrycount))
|
||||||
|
end
|
||||||
function set_pctime(sn)
|
function set_pctime(sn)
|
||||||
pctime = tonumber(sn) or 30
|
pctime = tonumber(sn) or 30
|
||||||
print("pctime = "..tostring(pctime))
|
print("pctime = "..tostring(pctime))
|
||||||
|
Loading…
Reference in New Issue
Block a user