mirror of
https://github.com/veeso/termscp.git
synced 2026-09-25 13:31:26 -07:00
Changed buffer size to 65535
This commit is contained in:
committed by
Christian Visintin
parent
ec4daf8e25
commit
53271966da
@@ -56,6 +56,7 @@ Released on FIXME:
|
|||||||
- **Tui-realm migration**:
|
- **Tui-realm migration**:
|
||||||
- migrated application to tui-realm 1.x
|
- migrated application to tui-realm 1.x
|
||||||
- Improved application performance
|
- Improved application performance
|
||||||
|
- Changed the buffer size to **65535** (was 65536) for transfer I/O
|
||||||
- **SSH Config**
|
- **SSH Config**
|
||||||
- Added `ssh config` parameter in configuration
|
- Added `ssh config` parameter in configuration
|
||||||
- It is now possible to specify the ssh configuration file to use
|
- It is now possible to specify the ssh configuration file to use
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
/// Buffer size for remote I/O
|
||||||
|
const BUFSIZE: usize = 65535;
|
||||||
|
|
||||||
/// Describes the reason that caused an error during a file transfer
|
/// Describes the reason that caused an error during a file transfer
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
enum TransferErrorReason {
|
enum TransferErrorReason {
|
||||||
@@ -483,7 +486,7 @@ impl FileTransferActivity {
|
|||||||
last_input_event_fetch = Some(Instant::now());
|
last_input_event_fetch = Some(Instant::now());
|
||||||
}
|
}
|
||||||
// Read till you can
|
// Read till you can
|
||||||
let mut buffer: [u8; 65536] = [0; 65536];
|
let mut buffer: [u8; BUFSIZE] = [0; BUFSIZE];
|
||||||
let delta: usize = match reader.read(&mut buffer) {
|
let delta: usize = match reader.read(&mut buffer) {
|
||||||
Ok(bytes_read) => {
|
Ok(bytes_read) => {
|
||||||
total_bytes_written += bytes_read;
|
total_bytes_written += bytes_read;
|
||||||
@@ -888,7 +891,7 @@ impl FileTransferActivity {
|
|||||||
last_input_event_fetch = Some(Instant::now());
|
last_input_event_fetch = Some(Instant::now());
|
||||||
}
|
}
|
||||||
// Read till you can
|
// Read till you can
|
||||||
let mut buffer: [u8; 65536] = [0; 65536];
|
let mut buffer: [u8; BUFSIZE] = [0; BUFSIZE];
|
||||||
let delta: usize = match reader.read(&mut buffer) {
|
let delta: usize = match reader.read(&mut buffer) {
|
||||||
Ok(bytes_read) => {
|
Ok(bytes_read) => {
|
||||||
total_bytes_written += bytes_read;
|
total_bytes_written += bytes_read;
|
||||||
|
|||||||
Reference in New Issue
Block a user