Skip to main content

Socket

Trait Socket 

Source
pub trait Socket {
    // Required methods
    fn handle(&self) -> i32;
    fn release(&mut self) -> Result<(), EspError>;
}

Required Methods§

Source

fn handle(&self) -> i32

Returns the integer FD.

Source

fn release(&mut self) -> Result<(), EspError>

This is called before cleaning up the the tls context and is responsible for essentially giving up ownership of the socket such that it can safely be closed by the ESP IDF.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§