pub fn send(mut self, socket_id: i32, data: &'static str) -> Self {
        self.stack.expect_send().times(1).returning(move |socket, buffer| {
            assert_eq!(socket_id, socket.id);
            if !data.is_empty() {
                assert_eq!(data.to_string(), String::from_utf8(buffer.to_vec()).unwrap());
            }

            nb::Result::Ok(0)
        });
        self
    }
/// Expect to send the given buffer
Expect to send the given buffer
Expect to send the given buffer
pub fn send(mut self, socket_id: i32, data: &'static str) -> Self {
        self.stack.expect_send().times(1).returning(move |socket, buffer| {
            assert_eq!(socket_id, socket.id);
            if !data.is_empty() {
                assert_eq!(data.to_string(), String::from_utf8(buffer.to_vec()).unwrap());
            }
            nb::Result::Ok(0)
        });
        self
    }
pub fn send ( mut self , socket_id : i32 , data : & ' static str ) -> Self { self . stack . expect_send ( ) . times ( 1 ) . returning ( move | socket , buffer | { assert_eq ! ( socket_id socket id ) ; if ! data . is_empty ( ) { assert_eq ! ( data to_string ( ) String from_utf8 ( buffer to_vec ( ) ) unwrap ( ) ) ; } nb :: Result :: Ok ( 0 ) } ) ; self }
Expect to send the given buffer
Expect to send the given buffer
mut self
socket_id
i32
data
&'static str
mut self
socket_id
i32
data
&'static str