Compare commits
7 Commits
3b618bd719
...
55daeaecf6
Author | SHA1 | Date |
---|---|---|
![]() |
55daeaecf6 | |
![]() |
15a23bb6e3 | |
![]() |
ce737d95a8 | |
![]() |
9ec89a17e2 | |
![]() |
c829aaa038 | |
![]() |
23e4835933 | |
![]() |
3639862c04 |
|
@ -103,6 +103,12 @@ version = "1.3.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
|
||||
|
||||
[[package]]
|
||||
name = "blake3"
|
||||
version = "1.3.3"
|
||||
|
@ -189,7 +195,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
|||
dependencies = [
|
||||
"ansi_term",
|
||||
"atty",
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
"strsim",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
|
@ -414,11 +420,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "fltk"
|
||||
version = "1.3.24"
|
||||
version = "1.4.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240c497f031c68fcde59efcd13390ee8fce5c815c6b6e8a3ad480dce7510465d"
|
||||
checksum = "9da639944e8827d048b63fe437e905e8177c41b9c7cb32f898ade7464208b3bd"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bitflags 2.4.2",
|
||||
"crossbeam-channel",
|
||||
"fltk-sys",
|
||||
"paste",
|
||||
|
@ -427,9 +433,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "fltk-sys"
|
||||
version = "1.3.24"
|
||||
version = "1.4.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae5725f846c2a8d0c718f6b114fd81fd2d8aab84fb54ff6deed96d94683ddce7"
|
||||
checksum = "f434491b616dce4081d022a503e1a6a0cedd677a292d3c6f173db9dc566cd021"
|
||||
dependencies = [
|
||||
"cmake",
|
||||
]
|
||||
|
@ -924,7 +930,7 @@ version = "0.26.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"static_assertions",
|
||||
|
@ -987,7 +993,7 @@ version = "0.10.44"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
"cfg-if",
|
||||
"foreign-types",
|
||||
"libc",
|
||||
|
@ -1428,7 +1434,7 @@ version = "0.8.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
"getopts",
|
||||
"memchr",
|
||||
"unicase",
|
||||
|
@ -1547,7 +1553,7 @@ version = "0.2.16"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1826,7 +1832,7 @@ version = "2.7.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
"core-foundation",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
|
@ -2326,9 +2332,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
|
|||
|
||||
[[package]]
|
||||
name = "ttf-parser"
|
||||
version = "0.17.1"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff"
|
||||
checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4"
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
|
|
|
@ -12,7 +12,7 @@ repository = "https://six-five-six-four.com/git/reactor/ptth"
|
|||
[dependencies]
|
||||
anyhow = "1.0.38"
|
||||
blake3 = "1.0.0"
|
||||
fltk = "1.3.24"
|
||||
fltk = "1.4.22"
|
||||
ptth_quic = { path = "../ptth_quic" }
|
||||
quinn = "0.9.3"
|
||||
rand = "0.8.4"
|
||||
|
|
|
@ -144,7 +144,7 @@ impl GuiClient <'_> {
|
|||
|
||||
let gui = GuiPort::new (fltk_tx, self.ports.len ());
|
||||
ports_col.add (&gui.row);
|
||||
ports_col.set_size (&gui.row, 30);
|
||||
ports_col.fixed (&gui.row, 30);
|
||||
|
||||
let port = Port {
|
||||
gui,
|
||||
|
@ -176,20 +176,20 @@ fn main () -> anyhow::Result <()> {
|
|||
let mut col = Flex::default ().column ().size_of_parent ();
|
||||
|
||||
let frame_status = Frame::default ();
|
||||
col.set_size (&frame_status, 30);
|
||||
col.fixed (&frame_status, 30);
|
||||
|
||||
{
|
||||
let mut row = Flex::default ().row ();
|
||||
|
||||
let l = Frame::default ().with_label ("Server ID");
|
||||
row.set_size (&l, 120);
|
||||
row.fixed (&l, 120);
|
||||
let l = Frame::default ().with_label ("Server port");
|
||||
row.set_size (&l, 80);
|
||||
row.fixed (&l, 80);
|
||||
let l = Frame::default ().with_label ("Local port");
|
||||
row.set_size (&l, 80);
|
||||
row.fixed (&l, 80);
|
||||
row.end ();
|
||||
|
||||
col.set_size (&row, 30);
|
||||
col.fixed (&row, 30);
|
||||
}
|
||||
|
||||
let mut ports_col = Flex::default ().column ();
|
||||
|
@ -198,7 +198,7 @@ fn main () -> anyhow::Result <()> {
|
|||
let mut but_add_port = Button::default ().with_label ("+");
|
||||
but_add_port.set_trigger (CallbackTrigger::Release);
|
||||
but_add_port.emit (fltk_tx, Message::AddPort);
|
||||
col.set_size (&but_add_port, 30);
|
||||
col.fixed (&but_add_port, 30);
|
||||
|
||||
col.end ();
|
||||
|
||||
|
@ -283,11 +283,11 @@ impl GuiPort {
|
|||
let mut but_open = Button::default ().with_label ("Open");
|
||||
let mut but_close = Button::default ().with_label ("Close");
|
||||
|
||||
row.set_size (&input_server_id, 120);
|
||||
row.set_size (&input_server_port, 80);
|
||||
row.set_size (&input_client_port, 80);
|
||||
row.set_size (&but_open, 80);
|
||||
row.set_size (&but_close, 80);
|
||||
row.fixed (&input_server_id, 120);
|
||||
row.fixed (&input_server_port, 80);
|
||||
row.fixed (&input_client_port, 80);
|
||||
row.fixed (&but_open, 80);
|
||||
row.fixed (&but_close, 80);
|
||||
|
||||
input_client_port.set_value ("");
|
||||
input_client_port.set_readonly (true);
|
||||
|
|
|
@ -231,7 +231,7 @@ async fn metrics (
|
|||
{
|
||||
let mut s = String::with_capacity (4 * 1_024);
|
||||
|
||||
let mut push_metric = |name, help, kind, value| {
|
||||
let mut push_metric = |name, help: Option<&str>, kind, value| {
|
||||
if let Some (help) = help {
|
||||
s.push_str (format! ("# HELP {} {}\n", name, help).as_str ());
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ pub async fn handle_response (
|
|||
|
||||
let magic_header = base64::decode (magic_header).map_err (PtthMagicHeaderNotBase64)?;
|
||||
|
||||
let resp_parts: http_serde::ResponseParts = rmp_serde::from_read_ref (&magic_header).map_err (PtthMagicHeaderNotMsgPack)?;
|
||||
let resp_parts: http_serde::ResponseParts = rmp_serde::from_slice (&magic_header).map_err (PtthMagicHeaderNotMsgPack)?;
|
||||
|
||||
// Intercept the body packets here so we can check when the stream
|
||||
// ends or errors out
|
||||
|
|
|
@ -414,7 +414,7 @@ impl State {
|
|||
}
|
||||
|
||||
let body = req_resp.bytes ().await.map_err (ServerError::CantCollectWrappedRequests)?;
|
||||
let wrapped_reqs: Vec <http_serde::WrappedRequest> = rmp_serde::from_read_ref (&body)
|
||||
let wrapped_reqs: Vec <http_serde::WrappedRequest> = rmp_serde::from_slice (&body)
|
||||
.map_err (ServerError::CantParseWrappedRequests)?;
|
||||
|
||||
Ok (wrapped_reqs)
|
||||
|
|
|
@ -55,5 +55,6 @@ pub fn load <
|
|||
> (
|
||||
config_file_path: P
|
||||
) -> Result <T, LoadTomlError> {
|
||||
load_public (config_file_path)
|
||||
let f = File::open (&config_file_path)?;
|
||||
load_inner (f)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cargo check --target x86_64-pc-windows-gnu -p ptth -p ptth_quic
|
||||
cargo check --target x86_64-unknown-linux-gnu -p ptth -p ptth_quic
|
Loading…
Reference in New Issue