Minor polish
This commit is contained in:
parent
ff5ff86794
commit
75b9634ea9
@ -4,7 +4,7 @@
|
|||||||
-- see: https://git.desu.ltd/salt/mc-scripts/src/branch/master/storage-net
|
-- see: https://git.desu.ltd/salt/mc-scripts/src/branch/master/storage-net
|
||||||
|
|
||||||
-- Default configuration values. Override in config.lua. DO NOT CHANGE HERE
|
-- Default configuration values. Override in config.lua. DO NOT CHANGE HERE
|
||||||
mode = "undefined" -- The mode of function for this node
|
mode = "ConfigureMe" -- The mode of function for this node
|
||||||
networkid = 0 -- Unique ID for this network
|
networkid = 0 -- Unique ID for this network
|
||||||
port_broadcast = 42914 -- Port for M->S traffic
|
port_broadcast = 42914 -- Port for M->S traffic
|
||||||
port_return = 42915 -- Port for S->M traffic
|
port_return = 42915 -- Port for S->M traffic
|
||||||
@ -18,21 +18,27 @@ print("Salt's CC Storage Net")
|
|||||||
print("Computer ID: " .. os.getComputerID())
|
print("Computer ID: " .. os.getComputerID())
|
||||||
print("Computer " .. os.getComputerID() .. " running as " .. mode)
|
print("Computer " .. os.getComputerID() .. " running as " .. mode)
|
||||||
|
|
||||||
|
-- Common globals
|
||||||
|
-- Master globals
|
||||||
|
-- Slave globals
|
||||||
|
|
||||||
-- Common functions
|
-- Common functions
|
||||||
function c_mainLoop(loopfunc)
|
function c_mainLoop(loopfunc)
|
||||||
-- Loops a thing forever
|
-- Loops a thing forever
|
||||||
while true do
|
while true do
|
||||||
loopfunc()
|
loopfunc()
|
||||||
sleep(1)
|
sleep(0.10)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Master functions
|
-- Master functions
|
||||||
function m_loop()
|
function m_loop()
|
||||||
-- The main loop of the master server
|
-- The main loop of the master server
|
||||||
|
sleep(1)
|
||||||
end
|
end
|
||||||
-- Slave functions
|
-- Slave functions
|
||||||
function s_loop()
|
function s_loop()
|
||||||
-- The main loop of any slave nodes
|
-- The main loop of any slave nodes
|
||||||
|
sleep(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Application entrypoint
|
-- Application entrypoint
|
||||||
|
Loading…
Reference in New Issue
Block a user