pub struct Kcp { /* private fields */ }Implementations§
Source§impl Kcp
impl Kcp
pub fn new(config: KcpConfig) -> Result<Box<Self>, Error>
pub fn set_output_cb(&mut self, output_cb: OutputCb)
pub fn handle_input(&mut self, data: &[u8]) -> Result<(), Error>
pub fn update(&mut self)
pub fn next_update_delay_ms(&mut self) -> c_uint
pub fn send(&mut self, data: Bytes) -> Result<usize, Error>
pub fn flush(&mut self)
pub fn peeksize(&self) -> i32
pub fn recv(&mut self, buf: &mut BytesMut) -> Result<(), Error>
pub fn waitsnd(&self) -> i32
pub fn sendwnd(&self) -> i32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kcp
impl !RefUnwindSafe for Kcp
impl !Sync for Kcp
impl !Unpin for Kcp
impl !UnwindSafe for Kcp
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