pub struct Adapter { /* private fields */ }Implementations§
Source§impl Adapter
impl Adapter
pub fn new(peer: Box<dyn ReadWrite>, host_ip: IpAddr, peer_ip: IpAddr) -> Self
Sourcepub fn set_mss(&mut self, mss: usize) -> &mut Self
pub fn set_mss(&mut self, mss: usize) -> &mut Self
Set the Maximum Segment Size (MSS) for outbound TCP segments.
This should be MTU - 40 (IPv6 header) - 20 (TCP header) for the
tunnel you are using. Defaults to 1220 (based on IPv6 min MTU 1280).
pub fn set_send_window(&mut self, window: usize) -> &mut Self
Sourcepub fn to_async_handle(self) -> AdapterHandle
pub fn to_async_handle(self) -> AdapterHandle
Wraps this adapter in a thread-safe handle.
pub async fn pcap(&mut self, path: impl AsRef<Path>) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Adapter
impl !UnwindSafe for Adapter
impl Forget for Adapter
impl Freeze for Adapter
impl Move for Adapter
impl Send for Adapter
impl Sync for Adapter
impl Unpin for Adapter
impl UnsafeUnpin for Adapter
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