mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
still writing this thing
This commit is contained in:
@@ -5,30 +5,13 @@ nGLOBAL = require("multi.integration.networkManager").init()
|
||||
node = multi:newNode{
|
||||
crossTalk = false, -- default value, allows nodes to talk to eachother. WIP NOT READY YET!
|
||||
allowRemoteRegistering = true, -- allows you to register functions from the master on the node, default is false
|
||||
name = nil, --"TESTNODE", -- default value is nil, if nil a random name is generated. Naming nodes are important if you assign each node on a network with a different task
|
||||
name = "MASTERPC", -- default value is nil, if nil a random name is generated. Naming nodes are important if you assign each node on a network with a different task
|
||||
--noBroadCast = true, -- if using the node manager, set this to true to save on some cpu cycles
|
||||
--managerDetails = {"localhost",12345}, -- connects to the node manager if one exists
|
||||
}
|
||||
function RemoteTest(a,b,c) -- a function that we will be executing remotely
|
||||
--print("Yes I work!",a,b,c)
|
||||
multi:newThread("waiter",function()
|
||||
print("Hello!")
|
||||
while true do
|
||||
thread.sleep(2)
|
||||
node:pushTo("Main","This is a test")
|
||||
end
|
||||
end)
|
||||
print("Yes I work!",a,b,c)
|
||||
end
|
||||
multi:newThread("some-test",function()
|
||||
local dat = node:pop()
|
||||
while true do
|
||||
thread.skip(10)
|
||||
if dat then
|
||||
print(dat)
|
||||
end
|
||||
dat = node:pop()
|
||||
end
|
||||
end,"NODE_TESTNODE")
|
||||
settings = {
|
||||
priority = 0, -- 1 or 2
|
||||
stopOnError = true,
|
||||
|
||||
Reference in New Issue
Block a user