Commit Graph

47 Commits

Author SHA1 Message Date
Huston Bokinsky 9d7b6f401d Hide continuation frames from application layer.
This commit asserts that continuation frames are an implementation
detail of the websocket layer, and should remain hidden from the
application layer.  That is:
  - a codec should write only frames to the wire, and read only frames from the wire
  - when sending messages, the websocket implementation should break large
    text and binary messages into continuation frames -- the application should
    not have to be aware of this.
  - when receiving messages, the websocket implementation should reconstitute
    continuation frames into their original messages -- the application should
    not have to handle this.
  - the application should only have to send and receive complete websocket messages

Here, the reconstitution of continuation frames into their original messages is
done by the Stream implementation of actix_web_actors::ws::WsStream, by adding
a continuation frame buffer and not issuing a Poll::Ready(Some(Ok)) result until
a complete message has been buffered.  A test in actix_web_actors::tests::test_ws.rs
checks this.

The breaking of large message payloads into sequential continuation frames is
done by the addition of an actix_http::ws::frame_iters module, which introduces
two structs ContinuationBins and ContinuationTexts.  These are iterators over
either single Frame::Binary or Frame::Text frames, if the payloads are small,
or over sequences of Frame::Continuation's with appropriate Items FirstBinary/FirstText,
Continue, and Last.  New tests in actix_http::ws::frame_iters verify this
functionality.
2020-04-19 22:32:28 -07:00
Yuki Okushi 1b28a5d48b
Update `actix-web` dependency to 3.0.0-alpha.1 2020-03-12 03:03:50 +09:00
Yuki Okushi 7941594f94
Update `actix-http` dependency 2020-03-08 00:50:20 +09:00
Yuki Okushi c9fdcc596d Update actix to 0.10.0-alpha.1 2020-02-27 12:46:29 +09:00
Yuki Okushi 3b675c9125 Update actix-http to 2.0.0-alpha.1 2020-02-27 12:39:04 +09:00
Maksym Vorobiov 9d04b250f9 This is a squashed commit:
- Convert MessageBody to accept Pin in poll_next

- add CHANGES and increase versions aligned to semver

- update crates to accomodate MessageBody Pin change

- fix tests and dependencies
2020-02-27 09:37:05 +09:00
Nikolay Kim 48476362a3 update changes 2019-12-20 17:59:34 +06:00
Nikolay Kim 8b8a9a995d bump ver 2019-12-20 17:36:48 +06:00
Nikolay Kim a153374b61 migrate actix-web-actors 2019-12-15 22:45:38 +06:00
Nikolay Kim 6c226e47bd prepare actix-web-actors release 2019-12-07 20:10:36 +06:00
Vlad Frolov 8c3f58db9d Allow comma-separated websocket subprotocols without spaces (#1172)
* Allow comma-separated websocket subprotocols without spaces

* [CHANGES] Added an entry to CHANGES.md
2019-12-07 20:08:06 +06:00
Nikolay Kim 5cb2d500d1 update actix-web-actors 2019-11-14 08:58:24 +06:00
Nikolay Kim 3618a84164 update changes 2019-07-20 11:27:21 +06:00
jairinhohw 03ca408e94 add support for specifying protocols on websocket handshake (#835)
* add support for specifying protocols on websocket handshake

* separated the handshake function with and without protocols
changed protocols type from Vec<&str> to [&str]
2019-07-20 11:22:06 +06:00
naerbnic e53e9c8ba3 Add the start_with_addr() function, to obtain an addr to the target websocket actor (#988) 2019-07-20 11:17:58 +06:00
Nikolay Kim 4092c7f326 clippy warnings 2019-07-17 15:08:30 +06:00
Nikolay Kim 12b5174850 update deps 2019-06-28 14:46:26 +06:00
Nikolay Kim 596483ff55 prepare actix-web-actors release 2019-06-28 10:54:23 +06:00
anthonyjchriste 768859513a Expose the max limit for payload sizes in Websocket Actors. #925 (#933)
* Expose the max limit for payload sizes in Websocket Actors.

* Revert to previous not-formatted code.

* Implement WebsocketContext::with_codec and make Codec Copy and Clone.

* Fix formatting.

* Fix formatting.
2019-06-28 10:49:03 +06:00
Nikolay Kim 686e5f1595 update deps 2019-06-16 22:10:22 +06:00
Nikolay Kim a1b40f4314 add license files 2019-06-01 17:25:29 +06:00
Nikolay Kim c2d7db7e06 prepare actix-web-actors release 2019-05-29 16:22:57 -07:00
Nikolay Kim e1ff3bf8fa fix resource match with params #841 2019-05-15 10:31:40 -07:00
Nikolay Kim 5a90e33bcc update deps 2019-05-12 12:01:24 -07:00
Nikolay Kim 36d017dcc6 update deps 2019-05-12 11:41:43 -07:00
Nikolay Kim e9cbcbaf03 update dependencies 2019-05-12 10:18:02 -07:00
Nikolay Kim 24bd5b1344 update readmes 2019-04-29 20:47:21 -07:00
Nikolay Kim f0789aad05 update dep versions 2019-04-21 09:03:46 -07:00
Nikolay Kim c943e95812 update dependencies 2019-04-16 11:17:29 -07:00
Nikolay Kim 14252f5ef2 use test::call_service 2019-04-15 09:09:21 -07:00
Nikolay Kim 1eebd47072 fix warnings 2019-04-14 21:00:16 -07:00
Nikolay Kim 1f2b15397d prepare alpha5 release 2019-04-12 14:00:45 -07:00
Nikolay Kim 748289f0ff use custom headers map; more optimizations 2019-04-06 15:02:02 -07:00
Nikolay Kim 442f5057dd alpha.3 release 2019-04-02 21:49:31 -07:00
Nikolay Kim 4227cddd30 fix dev dependencies 2019-04-02 15:00:10 -07:00
Nikolay Kim a20b9fd354 prepare aplha2 release 2019-03-29 22:06:14 -07:00
Nikolay Kim d846328f36 fork cookie crate 2019-03-29 21:13:39 -07:00
Nikolay Kim 9c198a0d29 alpha.1 release 2019-03-28 13:46:26 -07:00
Nikolay Kim 3edc515bac refactor RequestHead/ResponseHead 2019-03-27 10:38:01 -07:00
Nikolay Kim 9451ba71f4 update cargo files 2019-03-26 12:50:51 -07:00
Nikolay Kim e37e81af0b simplify Payload extractor 2019-03-24 17:00:59 -07:00
Nikolay Kim 8872f3b590 fix ws upgrade 2019-03-18 05:30:18 -07:00
Nikolay Kim efe3025395 add handshake test 2019-03-17 22:57:27 -07:00
Nikolay Kim b0343eb22d simplify ws stream interface 2019-03-17 22:31:10 -07:00
Nikolay Kim 6ab7665868 export ws module 2019-03-17 22:11:50 -07:00
Nikolay Kim fd3e351c31 add websockets context 2019-03-17 22:02:03 -07:00
Nikolay Kim 6b66681827 add basic actors integration 2019-03-17 13:47:20 -07:00