pub struct TcpConfig {
pub port_ranges: Option<String>,
pub conn_timeout_sec: u64,
pub network_profile: NetworkProfile,
pub buffer_size: Option<usize>,
pub max_connections: usize,
pub pending_writes_multiplier: usize,
}Expand description
Configuration for TCP connections
Used to configure TCP listeners and clients for file transfers.
Fields§
§port_ranges: Option<String>Port ranges to use for TCP connections (e.g., “8000-8999,9000-9999”)
conn_timeout_sec: u64Connection timeout for remote operations (seconds)
network_profile: NetworkProfileNetwork profile for tuning (default: Datacenter)
buffer_size: Option<usize>Buffer size for file transfers (defaults to profile-specific value)
max_connections: usizeMaximum concurrent connections in the pool
pending_writes_multiplier: usizeMultiplier for pending file writes (max pending = max_connections × multiplier)
Implementations§
Source§impl TcpConfig
impl TcpConfig
Sourcepub fn with_timeout(conn_timeout_sec: u64) -> Self
pub fn with_timeout(conn_timeout_sec: u64) -> Self
Create TcpConfig with custom timeout values
Sourcepub fn with_port_ranges(self, ranges: impl Into<String>) -> Self
pub fn with_port_ranges(self, ranges: impl Into<String>) -> Self
Set port ranges
Sourcepub fn with_network_profile(self, profile: NetworkProfile) -> Self
pub fn with_network_profile(self, profile: NetworkProfile) -> Self
Set network profile
Sourcepub fn with_buffer_size(self, size: usize) -> Self
pub fn with_buffer_size(self, size: usize) -> Self
Set buffer size for file transfers
Sourcepub fn with_max_connections(self, max: usize) -> Self
pub fn with_max_connections(self, max: usize) -> Self
Set maximum concurrent connections
Sourcepub fn with_pending_writes_multiplier(self, multiplier: usize) -> Self
pub fn with_pending_writes_multiplier(self, multiplier: usize) -> Self
Set pending writes multiplier
Sourcepub fn effective_buffer_size(&self) -> usize
pub fn effective_buffer_size(&self) -> usize
Get the effective buffer size (explicit or profile default)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TcpConfig
impl RefUnwindSafe for TcpConfig
impl Send for TcpConfig
impl Sync for TcpConfig
impl Unpin for TcpConfig
impl UnsafeUnpin for TcpConfig
impl UnwindSafe for TcpConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request