Kim Alvefur
6ac58a4d1c
net.websocket.frames: Remove completed TODO
...
The XOR is done in C since 4e5a2af9dd19
2023-07-29 01:42:19 +02:00
Kim Alvefur
869581384d
net: Prefix module imports with prosody namespace
2023-03-17 16:23:12 +01:00
Kim Alvefur
ece896d253
net.websocket.frames: Replace bit fiddling code with util.struct
...
Fallback code for not having either the string.pack and string.unpack
functions available in Lua 5.4 or the struct lib is no longer needed
since the struct lib was imported as util.struct in 3ce3633527af
2022-03-06 15:13:50 +01:00
Matthew Wild
4f4140fbc3
Merge 0.11->trunk
2020-10-15 14:25:09 +01:00
Kim Alvefur
00bad1a9fe
net.websocket.frames: Use C string XOR implementation
2020-10-14 19:41:42 +02:00
Kim Alvefur
b0393fe9e1
Merge 0.11->trunk
2020-10-12 21:29:20 +02:00
Kim Alvefur
fb63187afc
net.websocket.frames: Read buffer length correctly in Lua 5.1 ( fix #1598 )
...
COMPAT: The __len metamethod does not work with tables in Lua 5.1.
Both strings and util.dbuffer now expose their length as a :len()
method.
2020-10-12 20:21:18 +02:00
Matthew Wild
bff06592c7
Merge 0.11->trunk
2020-09-29 15:30:48 +01:00
Matthew Wild
a0fb8d876f
net.websocket.frames: Additionally return partial frame if there is one
2020-09-29 13:58:32 +01:00
Matthew Wild
5a1c206ece
mod_websocket: Switch partial frame buffering to util.dbuffer
...
This improves performance and enforces stanza size limits earlier
in the pipeline.
2020-09-17 13:04:46 +01:00
Matthew Wild
3989ff2ddc
net.websocket.frames: Allow all methods to work on non-string objects
...
Instead of using the string library, use methods from the passed object,
which are assumed to be equivalent.
This provides compatibility with objects from util.ringbuffer and
util.dbuffer, for example.
2020-09-17 13:00:19 +01:00
Kim Alvefur
3dcfc5ee71
util.bitops: Library to find appropriate bitwise library ( closes #1395 )
2019-07-22 01:58:57 +02:00
Kim Alvefur
3ec060fc0c
Fix spelling throughout the codebase [codespell]
2018-02-04 01:51:25 +01:00
Kim Alvefur
6f1b772ce0
net.websocket.frames: Ignore Lua 5.3-only fields [luacheck]
2017-12-02 02:12:06 +01:00
Matthew Wild
8967760df5
net.websocket.frames, util.datetime, util.json, util.prosodyctl, util.rfc6724: Remove unused variables [luacheck]
2016-03-10 17:52:03 +00:00
Kim Alvefur
b75d87f63d
net.websocket.frames: Fix syntax error due to code copy pasting
2015-10-06 18:08:58 +02:00
Kim Alvefur
0ce785a39c
net.websocket.frames: Use struct packing in Lua 5.3 or struct lib if available
2015-10-06 18:05:27 +02:00
Kim Alvefur
2efcb9f82f
net.websocket.frames: Pack and unpack 64bit ints without overflows (lua-bitop/bit32 are 32bit)
2015-10-06 18:03:04 +02:00
Kim Alvefur
5d941b553a
net.websocket.frames: Link to documentation when bitop is missing
2015-10-06 16:49:01 +02:00
Kim Alvefur
fc34f3fdbf
net.websocket.frames: Throw an error if no bit lib is found
2015-10-06 16:26:23 +02:00
Kim Alvefur
49fccb11b2
net.websocket.frames: Simplify import of bitlib
2015-10-06 16:06:22 +02:00
Florian Zeitz
0504583316
net.websocket: Make data masking configurable
2014-09-26 22:12:21 +02:00
daurnimator
143508d675
net/websocket: Add new websocket client code
2014-09-03 15:28:46 -04:00
Kim Alvefur
5a608450d5
lint: Remove use of the 143 error code
...
Does not appear to be invoked by anything
2018-12-08 17:10:51 +01:00
Kim Alvefur
2b289f34f9
various: Don't rely on _G.unpack existing
2018-12-08 17:09:55 +01:00
Kim Alvefur
874cf01e2b
net.websocket.frames: Prefer Lua 5.2 built-in bit module over LuaJIT version
...
When running on Lua 5.2 this makes sense since bit32 is usually already
loaded. It's sensible to prefer this going forward in case of
incompatibilities between the two variants.
2018-11-29 16:53:22 +01:00