Kim Alvefur
517c36edcf
net.websocket.frames: Use C string XOR implementation
5 years ago
Kim Alvefur
ca36c38a51
net.websocket.frames: Use C string XOR implementation
5 years ago
Kim Alvefur
0e8366644d
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.
5 years ago
Matthew Wild
c94ed18357
net.websocket.frames: Additionally return partial frame if there is one
5 years ago
Matthew Wild
a96430a843
mod_websocket: Switch partial frame buffering to util.dbuffer
...
This improves performance and enforces stanza size limits earlier
in the pipeline.
5 years ago
Matthew Wild
9a4e4f11f5
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.
5 years ago
Kim Alvefur
a63b4e5cc4
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.
5 years ago
Matthew Wild
3cd5ae9119
net.websocket.frames: Additionally return partial frame if there is one
5 years ago
Matthew Wild
d8be48981f
mod_websocket: Switch partial frame buffering to util.dbuffer
...
This improves performance and enforces stanza size limits earlier
in the pipeline.
5 years ago
Matthew Wild
f9550cb341
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.
5 years ago
Kim Alvefur
aedca363c0
util.bitops: Library to find appropriate bitwise library ( closes #1395 )
7 years ago
Kim Alvefur
b1235c60a7
Fix spelling throughout the codebase [codespell]
8 years ago
Kim Alvefur
8053e6cd90
net.websocket.frames: Ignore Lua 5.3-only fields [luacheck]
8 years ago
Matthew Wild
a05d69fc1f
net.websocket.frames, util.datetime, util.json, util.prosodyctl, util.rfc6724: Remove unused variables [luacheck]
10 years ago
Kim Alvefur
68c49f314e
net.websocket.frames: Fix syntax error due to code copy pasting
10 years ago
Kim Alvefur
7bff4f9128
net.websocket.frames: Use struct packing in Lua 5.3 or struct lib if available
10 years ago
Kim Alvefur
98b2e87b9d
net.websocket.frames: Pack and unpack 64bit ints without overflows (lua-bitop/bit32 are 32bit)
10 years ago
Kim Alvefur
9f7a18228f
net.websocket.frames: Link to documentation when bitop is missing
10 years ago
Kim Alvefur
0cd290671a
net.websocket.frames: Throw an error if no bit lib is found
10 years ago
Kim Alvefur
e0db9dc960
net.websocket.frames: Simplify import of bitlib
10 years ago
Florian Zeitz
89a01cc8d9
net.websocket: Make data masking configurable
11 years ago
daurnimator
716ad8b24a
net/websocket: Add new websocket client code
12 years ago
daurnimator
837a1f1df7
net/websocket: Add new websocket client code
12 years ago
Kim Alvefur
a8b096516b
lint: Remove use of the 143 error code
...
Does not appear to be invoked by anything
7 years ago
Kim Alvefur
6dcf53f7b2
various: Don't rely on _G.unpack existing
7 years ago
Kim Alvefur
2e3e5db959
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.
7 years ago