mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
Node manager working
A few things are left to do. Queues and adding support for some of the system threaded objects that exist.
This commit is contained in:
@@ -31,13 +31,16 @@ end
|
||||
-- Internal queue system for network queues
|
||||
local queue = {}
|
||||
queue.__index = queue
|
||||
function queue:newQueue()
|
||||
function queue:newQueue(name,master)
|
||||
if not name then error("You must include a name in order to create a queue!") end
|
||||
local c = {}
|
||||
c.name = name
|
||||
c.master = master
|
||||
setmetatable(c,self)
|
||||
return c
|
||||
end
|
||||
function queue:push(data)
|
||||
table.insert(self,packData(data))
|
||||
master:doToAll(char(CMD_QUEUE)..packData(data))
|
||||
end
|
||||
function queue:raw_push(data) -- Internal usage only
|
||||
table.insert(self,data)
|
||||
|
||||
Reference in New Issue
Block a user