Alex Butler
2d5b3e18de
Fix auto pong responses not flushing after block
...
Retry pong flushes on read.
Add read_usage_auto_pong_flush scenario test
2023-12-05 22:23:31 +01:00
Alex Butler
0f6e6517e6
Fix FrameHeader::format write & other lints
2023-12-02 00:01:17 +01:00
Alexey Galakhov
fc17f7341d
Merge pull request #373 from psychon/reduce-byteorder
...
Reduce use of byteorder crate
2023-11-17 19:38:27 +01:00
Daniel Abramov
272d83c430
doc: clarify the meaning of config values
2023-10-29 14:09:32 +01:00
Uli Schlachter
e4224ed85a
Reduce use of byteorder crate
...
The byteorder dependency is only used in protocol::frame::frame. I
thought this dependency could easily be removed and set out to replace
the use of byteorder with equivalent std methods.
NetworkEndian is an alias for BigEndian. Converting a number like u32 to
bytes can be done via the std lib via .to_be_bytes(). The opposite
direction is from_by_bytes(). These simple things thus to not need
byteorder.
There is one place in the code where byteorder actually helps, thus this
dependency is not actually fully removed. ByteOrder::read_uint() allows
to read 1 to 8 bytes of data and returns the result as u64. Doing this
with the standard library basically requires re-implementing byteorder.
Thus, I did not do that.
Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-08-18 10:35:33 +02:00
Daniel Abramov
8d8f0da204
Merge pull request #362 from alexheretic/config-asserts
...
Add assert panics for `WebSocketConfig`
2023-07-22 16:08:30 +02:00
Alex Butler
9567cc73f3
Add panics docs
2023-06-17 23:46:04 +01:00
Alex Butler
7869f11b41
Add assert panics for WebSocketConfig
2023-06-17 23:36:46 +01:00
Alex Butler
2345e28158
Clarify WebSocketConfig docs
2023-06-17 23:30:12 +01:00
Alex Butler
dea67d6cca
Fix doc typo
2023-05-30 18:26:59 +01:00
Alex Butler
41818166cf
refactor WebSocketContext new
2023-05-30 18:26:59 +01:00
Alex Butler
0cada00fb5
Refactor write_one_frame -> buffer_frame
2023-05-30 18:26:59 +01:00
Alex Butler
f33bb2cb97
Ensure out_buffer written when !can_read
2023-05-30 18:26:59 +01:00
Alex Butler
1b47964f18
split write and write_out_buffer internals
...
Fix internal method naming
2023-05-30 18:26:59 +01:00
Alex Butler
2ef5b9a5e2
Buffer writes before writing to the underlying stream
...
Add write_buffer_size
Set default 128 KiB
2023-05-30 18:26:59 +01:00
Alex Butler
06e55a4ef2
Refactor additional_send writing
2023-05-27 13:27:55 +01:00
Alex Butler
84a54b76e6
Rename methods to `read`, `send`, `write` & `flush`
...
Refine docs
Add `send` method
Add deprecated versions of write_message, write_pending,
read_message
Handle pong WriteBufferFull error
Add changelog
2023-05-27 13:19:13 +01:00
Alex Butler
0203a1849b
Remove send_queue, use out_buffer instead
2023-05-24 18:42:09 +01:00
Alex Butler
483d229707
Remove implicit write flushing
2023-05-24 18:42:09 +01:00
Daniel Abramov
42b8797e8b
Revert "Add `permessage-deflate` support"
...
This reverts commit edb2377540
.
See https://github.com/snapview/tungstenite-rs/pull/328#issuecomment-1480349206
2023-03-23 00:15:53 +01:00
kazk
edb2377540
Add `permessage-deflate` support
2023-03-18 12:36:01 +01:00
EXPLOSION
5125c59dfa
Display correct payload in Frame::fmt
2023-02-11 23:23:42 +00:00
Jack Wills
657faf427f
docs: message.rs typo
...
Simple typo fix of is_close() method
2023-02-01 05:46:06 +01:00
Yang Hau
984ad9d6c7
fix typos
2022-11-22 20:23:59 +08:00
Daniel Abramov
fd96a35300
tests: add a regression test for the queue logic
2022-08-03 16:13:03 +02:00
Alexey Galakhov
0b9d2a649b
Revert "add support for batching websocket messages"
2022-07-29 11:48:12 +02:00
RustUser246
68daa29b19
add support for batching websocket messages
2022-07-27 21:13:54 +01:00
Daniel Abramov
1b999136ef
clippy: fix warnings
2022-02-03 19:38:11 +01:00
Kirill A. Khalitov
469aaf37be
feature: Raw fragment message
2021-11-22 20:33:42 +03:00
Daniel Abramov
5ad8cef6ff
Echo the `CloseFrame` when close is initiated
2021-10-19 22:40:21 +02:00
Dominik Nakamura
5e0fde5dc6
Fix clippy warnings and deprecated settings
2021-07-21 10:43:44 +09:00
Daniel Abramov
2787031c2f
Replace `InputBuffer` with a faster alternative
...
We're also deprecating the usage of `input_buffer` crate, see:
https://github.com/snapview/input_buffer/issues/6#issuecomment-870548303
2021-07-05 18:38:06 +02:00
Teymour Aldridge
94aef58646
Fix a typo in a docstring
2021-05-24 16:09:33 +01:00
WiredSound
79dcf9f77c
Use matches! macro in tests
2021-01-11 14:14:36 +00:00
WiredSound
98377cf3dd
Rename ProtocolErrorType to just ProtocolError, implement using thiserror
2021-01-09 21:23:03 +00:00
WiredSound
652a6b776e
Rename CapacityErrorType to just CapacityError, implement using thiserror
2021-01-09 21:12:33 +00:00
WiredSound
78d59f9266
Escape square brackets in doc comment
2021-01-09 20:38:34 +00:00
WiredSound
0b34bee94f
Add capacity error types
2021-01-09 20:38:34 +00:00
WiredSound
6f846da0e3
Add protocol error types
2021-01-09 20:38:30 +00:00
Adam Bezecny (DHL IT Services)
c8c236056b
if streamlined
2020-12-02 22:43:47 +01:00
Adam Bezecny (DHL IT Services)
2e55ed0fcc
comment streamlined
2020-12-01 19:21:45 +01:00
Adam Bezecny (DHL IT Services)
9f292d21fc
minor fixes
2020-12-01 19:19:45 +01:00
Adam Bezecny (DHL IT Services)
4f7dab5d7b
documentation for server_allow_unmasked improved
2020-11-30 19:25:55 +01:00
Adam Bezecny (DHL IT Services)
a9adb42343
server_allow_unmasked changed from Option<bool> to bool
2020-11-27 21:38:33 +01:00
Adam Bezecny (DHL IT Services)
0121bf9682
WebSocketConfig extended to allow accepting unmasked client frames
2020-11-26 20:51:50 +01:00
Daniel Abramov
fcacea7c9f
chore: apply `clippy`
2020-11-17 12:40:52 +01:00
Daniel Abramov
96d9eb75e5
chore: apply `fmt` to the whole project
2020-11-17 12:40:52 +01:00
Horki
88ff5f371f
matches!: use macros; remove unused imports
2020-10-23 00:51:48 +02:00
philipp
599b677f5a
Avoid temporary variable `fin`
2020-09-21 18:57:39 +02:00
Daniel Abramov
fd7de42347
Merge pull request #110 from najamelan/doc/mib
...
doc: be precise about max message sizes.
2020-06-24 17:41:41 +02:00