summaryrefslogtreecommitdiff
path: root/xmake/core/base/poller.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-12-13 00:54:52 +0800
committerruki <[email protected]>2019-12-12 23:29:13 +0800
commit48c503cbca85ecea9e2ef9b5215f2e5c99c8bb24 (patch)
treefeffd02ceb2904d256f5216a93c09a5f500c9c62 /xmake/core/base/poller.lua
parent880b3b96f8222a027b0387bd1bfbbd793267d5a6 (diff)
add poller.support
Diffstat (limited to 'xmake/core/base/poller.lua')
-rw-r--r--xmake/core/base/poller.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/base/poller.lua b/xmake/core/base/poller.lua
index 222081ae7..48e22e6ab 100644
--- a/xmake/core/base/poller.lua
+++ b/xmake/core/base/poller.lua
@@ -112,6 +112,14 @@ function poller:_remove_sock(sock)
return true
end
+-- support events?
+function poller:support(otype, events)
+ if otype == poller.OT_SOCK then
+ return io.poller_support(events)
+ end
+ return false, string.format("invalid poller object type(%d)!", otype)
+end
+
-- insert object events to poller
function poller:insert(otype, obj, events, udata)
if otype == poller.OT_SOCK then