Comparison

plugins/mod_bosh.lua @ 7659:449de852cf38

mod_bosh: Save last response in case retransmission is required
author Sam Whited <sam@samwhited.com>
date Wed, 07 Sep 2016 19:32:29 +0100
parent 7653:17e42f793341
child 7660:d2825ddaac19
child 8097:e24263db3380
comparison
equal deleted inserted replaced
7653:17e42f793341 7659:449de852cf38
333 body_attr.ver = '1.6'; 333 body_attr.ver = '1.6';
334 body_attr.from = session.host; 334 body_attr.from = session.host;
335 body_attr["xmlns:xmpp"] = "urn:xmpp:xbosh"; 335 body_attr["xmlns:xmpp"] = "urn:xmpp:xbosh";
336 body_attr["xmpp:version"] = "1.0"; 336 body_attr["xmpp:version"] = "1.0";
337 end 337 end
338 oldest_request:send(st.stanza("body", body_attr):top_tag()..t_concat(session.send_buffer).."</body>"); 338 session.bosh_last_response = st.stanza("body", body_attr):top_tag()..t_concat(session.send_buffer).."</body>";
339 oldest_request:send(session.bosh_last_response);
339 session.send_buffer = {}; 340 session.send_buffer = {};
340 end 341 end
341 return true; 342 return true;
342 end 343 end
343 request.sid = sid; 344 request.sid = sid;