plugins/keepalive.lua@55e3fd7b9731
plugins/keepalive.lua
Sun, 10 Feb 2013 04:29:20 +0100
- author
- Kim Alvefur <zash@zash.se>
- date
- Sun, 10 Feb 2013 04:29:20 +0100
- changeset 328
- 55e3fd7b9731
- parent 250
-
a5ac643a7fd6
- permissions
- -rw-r--r--
verse: Err, I meant the stream, not the connection
local verse = require "verse";
function verse.plugins.keepalive(stream)
stream.keepalive_timeout = stream.keepalive_timeout or 300;
verse.add_task(stream.keepalive_timeout, function ()
stream.conn:write(" ");
return stream.keepalive_timeout;
end);
end