aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2007-09-02 14:13:57 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2007-09-02 14:13:57 -0500
commitfca31e21479a2df60c3449ec5727fc45d1fa13ee (patch)
tree72e7a0e4809c509df07c57ac699c47e147eb785d
parent4bdb3752996643790031892b6cba368a4c2d1ee5 (diff)
downloadluairc-fca31e21479a2df60c3449ec5727fc45d1fa13ee.tar.gz
luairc-fca31e21479a2df60c3449ec5727fc45d1fa13ee.zip
document the private module functions
-rw-r--r--src/irc.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/irc.lua b/src/irc.lua
index 423ad64..59d694b 100644
--- a/src/irc.lua
+++ b/src/irc.lua
@@ -580,7 +580,13 @@ end
-- module functions {{{
-- socket handling functions {{{
--- _register_socket() - register a socket to listen on {{{
+-- _register_socket {{{
+--
+-- Register a socket to listen on.
+-- @param sock LuaSocket socket object
+-- @param mode 'r' if the socket is for reading, 'w' if for writing
+-- @param cb Callback to call when the socket is ready for reading/writing.
+-- It will be called with the socket as the single argument.
function _register_socket(sock, mode, cb)
local socks, cbs
if mode == 'r' then
@@ -596,7 +602,11 @@ function _register_socket(sock, mode, cb)
end
-- }}}
--- _unregister_socket() - remove a previously registered socket {{{
+-- _unregister_socket {{{
+--
+-- Remove a previously registered socket.
+-- @param sock Socket to unregister
+-- @param mode 'r' to unregister it for reading, 'w' for writing
function _unregister_socket(sock, mode)
local socks, cbs
if mode == 'r' then