diff options
Diffstat (limited to 'debian/perl-framework/t/htdocs/modules/lua/websockets.lua')
-rw-r--r-- | debian/perl-framework/t/htdocs/modules/lua/websockets.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/debian/perl-framework/t/htdocs/modules/lua/websockets.lua b/debian/perl-framework/t/htdocs/modules/lua/websockets.lua new file mode 100644 index 0000000..1acd91b --- /dev/null +++ b/debian/perl-framework/t/htdocs/modules/lua/websockets.lua @@ -0,0 +1,13 @@ +function handle(r) +if r:wsupgrade() then -- if we can upgrade: + while true do + local line, isFinal = r:wsread() + r:wswrite(line) + if line == "quit" then + r:wsclose() -- goodbye! + break + end + + end +end +end |