Commit Graph

9 Commits

Author SHA1 Message Date
Lev Kokotov
9eac525e7d Fix typo in 'rocket_ws' README. 2023-10-26 20:01:06 -05:00
Fenhl
a32ea70835 Upgrade 'tokio-tungstenite' to 0.20. 2023-10-26 20:01:06 -05:00
BlackDex
36a5c82e8b Update 'tungstenite' to 0.19 in 'rocket-ws'. 2023-10-26 19:22:54 -05:00
Benedikt Weber
1f06bb0b73 Allow status customization in 'Forward' outcomes.
Prior to this commit, all forward outcomes resulted in a 404. This
commit changes request and data guards so that they are able to provide
a `Status` on `Forward` outcomes. The router uses this status, if the
final outcome is to forward, to identify the catcher to invoke.

The net effect is that guards can now customize the status code of a
forward and thus the error catcher invoked if the final outcome of a
request is to forward.

Resolves #1560.
2023-05-05 18:21:17 -07:00
Sergio Benitez
07ea3df0c2 Fix links to 'Stream!' in 'ws' rustdocs. 2023-04-05 09:58:21 -07:00
Sergio Benitez
db96f670b7 Fix contrib 'ws' README formatting. 2023-04-04 15:37:22 -07:00
Sergio Benitez
c3520fb4a1 Pin I/O handlers. Allow 'FnOnce' in 'ws' handlers.
This modifies the 'IoHandler::io()' method so that it takes a
'Pin<Box<Self>>', allowing handlers to move internally and assume that
the data is pinned.

The change is then used in the 'ws' contrib crate to allow 'FnOnce'
handlers instead of 'FnMut'. The net effect is that streams, such as
those crated by 'Stream!', are now allowed to move internally.
2023-04-04 15:33:46 -07:00
Sergio Benitez
d9f86d8647 Fully document the 'ws' contrib crate. 2023-04-03 16:09:45 -07:00
Sergio Benitez
7d895eb9f6 Add initial implementation of 'rocket_ws'.
This provides WebSocket support in Rocket's official 'contrib'.
2023-04-01 15:02:24 -07:00