bug fixing should be done
This commit is contained in:
parent
7dbcd01c33
commit
27e03a2546
22
client.lua
22
client.lua
@ -1,22 +0,0 @@
|
|||||||
package.path = "?/init.lua;?.lua;"..package.path
|
|
||||||
|
|
||||||
local multi, thread = require("multi"):init()
|
|
||||||
net = require("lnet.tcp")
|
|
||||||
|
|
||||||
client = net.newTCPClient("localhost",12345)
|
|
||||||
multi:newThread(function()
|
|
||||||
while true do
|
|
||||||
thread.sleep(1)
|
|
||||||
client:send(multi:getTasksDetails())
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
multi:newThread(function()
|
|
||||||
while true do
|
|
||||||
thread.sleep(.01)
|
|
||||||
multi:newLoop()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
||||||
multi:mainloop()
|
|
||||||
@ -984,7 +984,6 @@ end
|
|||||||
local sandcount = 1
|
local sandcount = 1
|
||||||
function multi:newProcessor(name)
|
function multi:newProcessor(name)
|
||||||
local c = {}
|
local c = {}
|
||||||
print("Proc Created:",sandcount)
|
|
||||||
setmetatable(c,{__index = self})
|
setmetatable(c,{__index = self})
|
||||||
local multi,thread = require("multi"):init() -- We need to capture the t in thread
|
local multi,thread = require("multi"):init() -- We need to capture the t in thread
|
||||||
local name = name or "Processor_"..sandcount
|
local name = name or "Processor_"..sandcount
|
||||||
|
|||||||
11
server.lua
11
server.lua
@ -1,11 +0,0 @@
|
|||||||
package.path = "?/init.lua;?.lua;"..package.path
|
|
||||||
|
|
||||||
local multi, thread = require("multi"):init()
|
|
||||||
net = require("lnet.tcp")
|
|
||||||
|
|
||||||
server = net.newTCPServer(12345)
|
|
||||||
server.OnDataRecieved(function(self,data)
|
|
||||||
print(data)
|
|
||||||
end)
|
|
||||||
|
|
||||||
multi:mainloop()
|
|
||||||
Loading…
x
Reference in New Issue
Block a user