aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-05-09 16:15:40 +0200
committerKim Alvefur <zash@zash.se>2018-05-09 16:15:40 +0200
commita247edeac984c22ac4419eb03b5bbbdcd9a2206f (patch)
treeea76a040fa49fccc3bc0669effd781d0382c34cd /doc
parentd6ed959fd38c1f32aa41ba42db0061531b4703fe (diff)
downloadprosody-a247edeac984c22ac4419eb03b5bbbdcd9a2206f.tar.gz
prosody-a247edeac984c22ac4419eb03b5bbbdcd9a2206f.zip
net.server: Add watchfd, a simple API for watching file descriptors
Diffstat (limited to 'doc')
-rw-r--r--doc/net.server.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/net.server.lua b/doc/net.server.lua
index bd207fd5..f07a2bd0 100644
--- a/doc/net.server.lua
+++ b/doc/net.server.lua
@@ -229,6 +229,18 @@ Arguments:
local function hook_signal(signal_id, handler)
end
+--[[ Adds a low-level FD watcher
+Arguments:
+- fd_number: A non-negative integer representing a file descriptor or
+ object with a :getfd() method returning one
+- on_readable: Optional callback for when the FD is readable
+- on_writable: Optional callback for when the FD is writable
+
+Returns:
+- net.server handle
+]]
+local function watchfd(fd_number, on_readable, on_writable)
+end
return {
get_backend = get_backend;
@@ -240,4 +252,5 @@ return {
addclient = addclient;
closeall = closeall;
hook_signal = hook_signal;
+ watchfd = watchfd;
}