summaryrefslogtreecommitdiff
path: root/channel.lua
blob: e90806937b3db27ec89c82fa80305f53bca422b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- channel descriptor

local Channel = {}
function Channel.make(pylon, descriptor)
	return setmetatable({pylon=pylon, descriptor=descriptor}, Channel)
end
function Channel.__eq(self, other)
	return self.pylon == other.pylon and self.descriptor == other.descriptor
end
function Channel.__call(_, ...) return Channel.make(...) end
function Channel.__tostring(self)
	return self.pylon.name .. ':' .. self.descriptor
end
setmetatable(Channel, Channel)
return Channel