Software / code / verse
Comparison
client.lua @ 444:12c1be0044c6
client: Send whitespace keeplives
This is to prevent net.server from timing out connections.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 06 Jun 2021 16:43:36 +0200 |
| parent | 430:b1f7214c6ec2 |
| child | 452:628896d39d8e |
comparison
equal
deleted
inserted
replaced
| 443:89526c890363 | 444:12c1be0044c6 |
|---|---|
| 89 self:close("xml-not-well-formed"); | 89 self:close("xml-not-well-formed"); |
| 90 end | 90 end |
| 91 | 91 |
| 92 self:hook("connected", function () self:reopen(); end); | 92 self:hook("connected", function () self:reopen(); end); |
| 93 self:hook("incoming-raw", function (data) return self.data(self.conn, data); end); | 93 self:hook("incoming-raw", function (data) return self.data(self.conn, data); end); |
| 94 self:hook("read-timeout", function () self:send(" "); return true; end, -1); | |
| 94 | 95 |
| 95 self.curr_id = 0; | 96 self.curr_id = 0; |
| 96 | 97 |
| 97 self.tracked_iqs = {}; | 98 self.tracked_iqs = {}; |
| 98 self:hook("stanza", function (stanza) | 99 self:hook("stanza", function (stanza) |