Commit Graph

78 Commits

Author SHA1 Message Date
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
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
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 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 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
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
Naja Melan 9c48226c8f chore: Remove needless closing/opening of the impl block on WebSocketContext. 2020-03-21 17:14:45 +01:00
Naja Melan 1f407f1005 feat: Allow reading the configuration.
This allows wrapper types to correctly split data before creating websocket
messages, guaranteeing to respect the max size.

Notably when the WebSocket is provided by user code.
2020-03-21 17:13:57 +01:00
Naja Melan d17f749914 doc: be precise about max message sizes.
If preferred to avoid abbreviations, it could be called mebibytes.
2020-03-21 16:46:51 +01:00
Alexey Galakhov 6b3423292f trivial: fix clippy warning
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2020-01-31 03:13:31 +01:00
Alexey Galakhov 85f211230a websocket: add `can_read()` and `can_write()`
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2020-01-17 21:23:38 +01:00
Alexey Galakhov da3acc107e protocol: handle "Connection reset by peer" in closing state
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2020-01-13 21:50:04 +01:00
Sebastian Dröge 88760b8b59 Fix various clippy warnings 2019-11-24 18:05:40 +01:00
Sebastian Dröge 7a4779b6f6 Run everything through rustfmt 2019-11-24 18:05:40 +01:00
Naja Melan 17fe7987eb Make use of can_read 2019-09-20 21:17:29 +02:00
Daniel Abramov dd602455c4
Merge pull request #79 from najamelan/docs/close
WIP: Add some documentation to WebSocket and Error.
2019-09-20 12:54:26 +02:00
Naja Melan 1ee3f342aa Consider remote sending a frame after sending a close frame a protocol error.
The websocket RFC explicitly states this is not allowed.
2019-09-19 20:32:04 +02:00
Naja Melan 2918eec1b3 No longer accept to send after close 2019-09-19 20:32:04 +02:00
Naja Melan f818322a25 Add some documentation to WebSocket and Error. 2019-09-14 16:55:47 +02:00
Naja Melan 9379ebe47d Don't swallow ping/pong while waiting for close acknowledgement 2019-09-12 22:16:45 +02:00
Naja Melan bf63a71cd1 cleanup unnecessary dereference 2019-09-12 16:37:23 +02:00
Naja Melan 28579b567a Improve WebSocketState interface with Copy, PartialEq, ... 2019-09-12 02:55:07 +02:00
Naja Melan b923ec42c0 Keep processing incoming data even after we have initiated a close handshake. 2019-09-12 01:13:38 +02:00
Artem Vorotnikov cbf80ecc76
Edition 2018, formatting, clippy fixes 2019-08-26 21:05:24 +03:00
Daniel Abramov e2bec4b81f Change the way we return `Err::ConnectionClosed`
This way will ensure that we only return this error once. The previous
solution fixed the problem, but it did not guarantee that ""connection
closed" is returned only once.
2019-08-07 20:03:52 +02:00
Daniel Abramov dbc8bd7b71 Fix issue with hanging server connection 2019-08-07 18:56:40 +02:00
Alexey Galakhov 06308b1b3f close: fix autobahn regression
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2019-05-17 00:36:45 +02:00
Alexey Galakhov b8f7d3668e close: refine close semantics
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2019-05-14 02:13:35 +02:00
Yusuke Sasaki 828eafd400 extract the context values from `WebSocket` 2019-03-26 21:25:52 +09:00
Daniel Abramov c8c3d6290d Make `Close` part of the `Message` enum 2019-02-07 14:26:16 +01:00
Alexey Galakhov a7e87488c4 config: make config settable at runtime
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2018-07-16 15:57:22 +02:00
Alexey Galakhov 9b0a2e0f11 trivial: split public and private impl
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2018-07-16 14:57:14 +02:00
Alexey Galakhov e6ebf5ac76 trivial: style fixes
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
2018-07-11 18:36:31 +02:00