pub struct SocketOptimizer;Expand description
Socket optimizer for high-throughput scenarios
Implementations§
Source§impl SocketOptimizer
impl SocketOptimizer
Sourcepub fn optimize_for_throughput(stream: &TcpStream) -> Result<(), Error>
pub fn optimize_for_throughput(stream: &TcpStream) -> Result<(), Error>
Set socket optimizations for high-throughput transfers using socket2
Sourcepub fn apply_to_connection_streams(
client_stream: &ConnectionStream,
backend_stream: &ConnectionStream,
) -> Result<(), Error>
pub fn apply_to_connection_streams( client_stream: &ConnectionStream, backend_stream: &ConnectionStream, ) -> Result<(), Error>
Apply optimizations using the new trait-based approach (recommended)
Auto Trait Implementations§
impl Freeze for SocketOptimizer
impl RefUnwindSafe for SocketOptimizer
impl Send for SocketOptimizer
impl Sync for SocketOptimizer
impl Unpin for SocketOptimizer
impl UnwindSafe for SocketOptimizer
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