Skip to content

Commit

Permalink
improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
BRA1L0R committed Jan 21, 2023
1 parent d1d9da4 commit e61805f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hopper"
version = "0.4.11"
version = "0.4.12"
edition = "2021"

# [features]
Expand Down
4 changes: 2 additions & 2 deletions src/server/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ impl Bridge {
/// Uses an external transferred counter so in an event of an error or
/// when the future gets dropped by the select data still gets recorded
async fn pipe(mut input: OwnedReadHalf, mut output: OwnedWriteHalf, transferred: &mut u64) {
// A 1024 bytes buffer should be big enough
let mut buffer = [0u8; 1024];
// Accomodate the average MTU of tcp connections
let mut buffer = [0u8; 2048];

// read from the socket into the buffer, increment the transfer counter
// and then write all to the other end of the pipe
Expand Down

0 comments on commit e61805f

Please sign in to comment.