Commit graph

55 commits

Author SHA1 Message Date
Joakim Frostegård
82a36041b3 Merge branch 'master' into ws-file-transfer-ci 2021-08-16 19:27:13 +02:00
Joakim Frostegård
d172fc4f8c Upgrade socket2 2021-08-15 23:32:59 +02:00
Joakim Frostegård
d0e716f80b Run rustfmt, clean up aquatic_http_protocol/Cargo.toml 2021-08-15 22:26:11 +02:00
Joakim Frostegård
d93f1fda7f aquatic_ws: add more trace logging 2021-02-10 23:43:08 +01:00
Joakim Frostegård
405df71371 Upgrade tungstenite to version 0.12 2021-02-10 18:36:23 +01:00
Joakim Frostegård
9af4e4663d aquatic_ws: send responses for every event, wake mio for responses 2020-08-11 23:58:00 +02:00
Joakim Frostegård
de1a299f1e aquatic_ws: InMessage::to_ws_message: don't take ownership 2020-08-11 23:24:46 +02:00
Joakim Frostegård
56bc028a44 aquatic_ws: OutMessage and InMessage simd-json fixes
* use simd-json in OutMessage deserialization
* take ownership in InMessage deserialization to avoid bugs
* Update benchmark results, benchmark was broken
* Compile simd-json even if simd is not on, so that rust-analyzer
  works
2020-08-11 23:02:19 +02:00
Joakim Frostegård
5d40954936 aquatic_ws: deserialize InMessage with simd-json for performance
From 18% to 13% CPU time during load test run.

Criterion benchmark of deserialization got about 90% improvement.
2020-08-11 06:32:51 +02:00
Joakim Frostegård
99724c7e5d aquatic_ws: add bench for InMessage::from_ws_message, take ws msg by ref 2020-08-11 05:36:29 +02:00
Joakim Frostegård
1a3ab54b3f aquatic_ws: when removing connection, reregister from poll 2020-08-10 03:51:08 +02:00
Joakim Frostegård
0637f83daa aquatic_ws: rewrite failing serialization, add tests
Use different approach to action fields and info_hash vec, fixing
failing tests
2020-08-09 00:26:26 +02:00
Joakim Frostegård
561cc3db55 fix more clippy warnings 2020-08-02 00:36:56 +02:00
Joakim Frostegård
aabdf76a5d aquatic_ws: fix some clippy warnings 2020-08-02 00:07:12 +02:00
Joakim Frostegård
716228c1b1 aquatic_ws: don't run log::error on closing closed connection 2020-08-01 06:09:42 +02:00
Joakim Frostegård
6a9e1f5e72 aquatic_ws: keep valid_until up to date in established connections 2020-08-01 04:27:31 +02:00
Joakim Frostegård
0f072244ab WIP: aquatic_ws: use microseconds for poll timeout, remove unwrap 2020-08-01 03:44:29 +02:00
Joakim Frostegård
a5108f813d WIP: aquatic_ws: add half-crappy load test, fix infinite loop bug 2020-08-01 03:35:00 +02:00
Joakim Frostegård
809d16919d aquatic_ws: convert ipv4-mapped ipv6 addresses to ipv4 (for state split) 2020-08-01 00:08:18 +02:00
Joakim Frostegård
d5de57b45f aquatic_ws: replace flume with crossbeam-channel
This improved performance in aquatic_http
2020-07-31 01:47:45 +02:00
Joakim Frostegård
be18fb2655 aquatic_ws network connection: improve documentation 2020-05-30 15:04:49 +02:00
Joakim Frostegård
689a874cbe aquatic_ws: use debug log level for "read message" and "sent message" 2020-05-25 18:51:04 +02:00
Joakim Frostegård
1ec4745f45 aquatic_ws: use socket2 instead of net2 2020-05-25 18:24:36 +02:00
Joakim Frostegård
e3b7af2c00 aquatic_ws: log error messages on channel send failure 2020-05-23 20:41:20 +02:00
Joakim Frostegård
b9ee290ca0 aquatic_ws: add more anyhow error context annotations 2020-05-23 17:15:11 +02:00
Joakim Frostegård
7c33358254 aquatic_ws: polling: don't check if event readable
We only register interest in readable events so this should be OK
2020-05-23 17:06:46 +02:00
Joakim Frostegård
a596ee155a aquatic_ws: wait for and quit on socket bind errors in workers 2020-05-23 16:38:31 +02:00
Joakim Frostegård
d4bcc14c82 aquatic_ws: add setting Config.ipv6_only 2020-05-23 15:40:56 +02:00
Joakim Frostegård
23e0e0bcd0 aquatic_ws: add log::trace statements for message read and write 2020-05-23 14:44:42 +02:00
Joakim Frostegård
a30335730b aquatic_ws: add settings for max ws message sizes, set low defaults 2020-05-23 14:44:03 +02:00
Joakim Frostegård
0f6d6d4b21 aquatic_ws: use log crate for debug error messages 2020-05-23 14:24:26 +02:00
Joakim Frostegård
572aa632b6 aquatic_ws: don't handle connection closed same as other errors 2020-05-23 14:17:03 +02:00
Joakim Frostegård
526faa9aab cli_helpers: use anyhow in app fn; aquatic_ws: reorganize error handling 2020-05-23 14:05:50 +02:00
Joakim Frostegård
b42ff9a23b aquatic_ws: remove DebugCallback and lots of debug output
Some error messages are still printed, though
2020-05-18 13:01:48 +02:00
Joakim Frostegård
0eb4039b5e aquatic_ws: network: use HandshakeMachine::new in Connection 2020-05-15 16:16:03 +02:00
Joakim Frostegård
420dcbc717 aquatic_ws: network: rename common.rs to connection.rs 2020-05-15 16:15:39 +02:00
Joakim Frostegård
73c90622c7 aquatic_ws network: make HandshakeMachine non-public 2020-05-15 16:12:56 +02:00
Joakim Frostegård
138e501599 aquatic_ws: impl read_vectored and write_vectored for Stream 2020-05-14 01:06:18 +02:00
Joakim Frostegård
6c26331ffb aquatic_ws: add inline markers to functions that will probably be hot 2020-05-14 00:25:31 +02:00
Joakim Frostegård
b05db0f699 aquatic_ws: remove unused import 2020-05-13 20:05:39 +02:00
Joakim Frostegård
63b84e7706 aquatic_ws: move more code into Connection impl 2020-05-13 20:02:05 +02:00
Joakim Frostegård
7011a797ee Update TODO; clean up code 2020-05-13 19:40:49 +02:00
Joakim Frostegård
846e076b4b aquatic_ws: move code into Connection impl, so inner can be private 2020-05-13 19:34:46 +02:00
Joakim Frostegård
0bcfffb2bd aquatic_ws: create HandshakeMachine from ConnectionStage 2020-05-13 19:17:33 +02:00
Joakim Frostegård
2967129c1f aquatic_ws: network: streamline handshake handlers 2020-05-13 18:44:10 +02:00
Joakim Frostegård
6d06a43db8 aquatic_ws: add setting for using tls; update TODO 2020-05-13 16:43:23 +02:00
Joakim Frostegård
a6f1d3fa36 aquatic_ws: network: improve comments 2020-05-13 16:02:49 +02:00
Joakim Frostegård
021fd554b0 aquatic_ws: streamline network code 2020-05-13 15:56:45 +02:00
Joakim Frostegård
68abecdaa5 aquatic_ws: run_handshakes_and_read_messages: simplify code 2020-05-13 15:49:07 +02:00
Joakim Frostegård
7e2f371007 aquatic_ws: simplify network code further 2020-05-13 15:14:11 +02:00