Mercurial > prosody-hg
comparison net/websocket/frames.lua @ 11107:ddd0007e0f1b 0.11
mod_websocket: Switch partial frame buffering to util.dbuffer
This improves performance and enforces stanza size limits earlier
in the pipeline.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 17 Sep 2020 13:04:46 +0100 |
| parents | 76f46c2579a2 |
| children | bcc701377fe4 |
comparison
equal
deleted
inserted
replaced
| 11106:76f46c2579a2 | 11107:ddd0007e0f1b |
|---|---|
| 18 local rshift = bit.rshift; | 18 local rshift = bit.rshift; |
| 19 local unpack = table.unpack or unpack; -- luacheck: ignore 113 | 19 local unpack = table.unpack or unpack; -- luacheck: ignore 113 |
| 20 | 20 |
| 21 local t_concat = table.concat; | 21 local t_concat = table.concat; |
| 22 local s_char= string.char; | 22 local s_char= string.char; |
| 23 local s_pack = string.pack; | 23 local s_pack = string.pack; -- luacheck: ignore 143 |
| 24 local s_unpack = string.unpack; | 24 local s_unpack = string.unpack; -- luacheck: ignore 143 |
| 25 | 25 |
| 26 if not s_pack and softreq"struct" then | 26 if not s_pack and softreq"struct" then |
| 27 s_pack = softreq"struct".pack; | 27 s_pack = softreq"struct".pack; |
| 28 s_unpack = softreq"struct".unpack; | 28 s_unpack = softreq"struct".unpack; |
| 29 end | 29 end |
