From 4dec20e4ff11b61be57a6cfbdb289327d9e1eb7d Mon Sep 17 00:00:00 2001
From: ubq323 <ubq323@ubq323.website>
Date: Tue, 25 Feb 2025 23:43:41 +0000
Subject: the Restructuring

---
 util/channel.lua | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 util/channel.lua

(limited to 'util/channel.lua')

diff --git a/util/channel.lua b/util/channel.lua
new file mode 100644
index 0000000..e908069
--- /dev/null
+++ b/util/channel.lua
@@ -0,0 +1,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
-- 
cgit v1.2.3