/** Listen to connections on a port */
Listen to connections on a port
Listen to connections on a port
pub fn listen(&mut self, port: u16) -> Result<(), S::Error> {
        assert!(self.state == State::Idle);
        // TODO: stop old listeners
        self.port.write_all(b"AT+CIPSERVER=1,")?;
        write_num_u32(self.port, port.into())?;
        self.port.write_all(b"\r\n")?;
        self.state = State::RequestListen(port);
        Ok(())
    }
pub fn listen ( & mut self , port : u16 ) -> Result < ( ) , S :: Error > { assert ! ( self state State Idle ) ; // TODO: stop old listeners self . port . write_all ( b" " ) ? ; write_num_u32 ( self . port , port . into ( ) ) ? ; self . port . write_all ( b" \r \n " ) ? ; self . state = State :: RequestListen ( port ) ; Ok ( ( ) ) }
Listen to connections on a port
Listen to connections on a port
&mut self
port
u16