pub fn request<W5500: Registers>(&self, w5500: &mut W5500) -> Result<(), Error<W5500::Error>> {
        const LI: u8 = (LeapIndicator::NoWarning as u8) << 6;
        const VN: u8 = VERSION_NUMBER << 3;
        const MODE: u8 = Mode::Client as u8;

        const STRATUM: u8 = 0;
        const POLL: u8 = 0;
        const PRECISION: u8 = 0;

        // https://www.rfc-editor.org/rfc/rfc4330.html#section-4
        #[rustfmt::skip]
        const REQUEST_PKT: [u8; 48] = [
            LI | VN | MODE, STRATUM, POLL, PRECISION,
            // 4..8 root relay
            0, 0, 0, 0,
            // 8..12 root dispersion
            0, 0, 0, 0,
            // 12..16 reference identifier
            0, 0, 0, 0,
            // 16..24 reference timestamp
            0, 0, 0, 0, 0, 0, 0, 0,
            // 24..32 originate timestamp
            0, 0, 0, 0, 0, 0, 0, 0,
            // 32..40 receive timestamp
            0, 0, 0, 0, 0, 0, 0, 0,
            // 40..48 transmit timestamp
            // in the future this can be provided as an argument
            0, 0, 0, 0, 0, 0, 0, 0,
        ];

        let mut writer: UdpWriter<W5500> = w5500.udp_writer(self.sn)?;
        writer.write_all(&REQUEST_PKT)?;
        writer.send()?;

        Ok(())
    }
/// Send a request to the SNTP server.
///
/// This will enable the RECV interrupt for the socket, and mask all others.
///
/// At the moment this does not support adding a transmit timestamp.
///
/// The result can be retrieved with [`on_recv_interrupt`] after the next
/// RECV interrupt.
///
/// # Errors
///
/// This method can only return:
///
/// * [`Error::Other`]
/// * [`Error::OutOfMemory`]
///   * Sending a request requires 48 bytes of memory in the socket buffers.
///
/// # Example
///
/// ```no_run
/// # let mut w5500 = w5500_regsim::W5500::default();
/// use w5500_sntp::{
///     ll::{
///         net::{Ipv4Addr, SocketAddrV4},
///         Sn,
///     },
///     Client, DST_PORT,
/// };
///
/// const SNTP_SRC_PORT: u16 = 123;
/// const SNTP_SERVER: SocketAddrV4 = SocketAddrV4::new(Ipv4Addr::new(216, 239, 35, 4), DST_PORT);
///
/// let sntp_client: Client = Client::new(Sn::Sn3, SNTP_SRC_PORT, SNTP_SERVER);
/// sntp_client.setup_socket(&mut w5500)?;
/// sntp_client.request(&mut w5500)?;
/// # Ok::<(), w5500_hl::Error<std::io::ErrorKind>>(())
/// ```
///
/// [`on_recv_interrupt`]: Self::on_recv_interrupt
Send a request to the SNTP server.
This will enable the RECV interrupt for the socket, and mask all others.

At the moment this does not support adding a transmit timestamp.

The result can be retrieved with [`on_recv_interrupt`] after the next
RECV interrupt.
Send a request to the SNTP server . This will enable the RECV interrupt for the socket and mask all others . At the moment this does not support adding a transmit timestamp . The result can be retrieved with [ ` on_recv_interrupt ` ] after the next RECV interrupt .
pub fn request<W5500: Registers>(&self, w5500: &mut W5500) -> Result<(), Error<W5500::Error>> {
        const LI: u8 = (LeapIndicator::NoWarning as u8) << 6;
        const VN: u8 = VERSION_NUMBER << 3;
        const MODE: u8 = Mode::Client as u8;
        const STRATUM: u8 = 0;
        const POLL: u8 = 0;
        const PRECISION: u8 = 0;
        // https://www.rfc-editor.org/rfc/rfc4330.html#section-4
        #[rustfmt::skip]
        const REQUEST_PKT: [u8; 48] = [
            LI | VN | MODE, STRATUM, POLL, PRECISION,
            // 4..8 root relay
            0, 0, 0, 0,
            // 8..12 root dispersion
            0, 0, 0, 0,
            // 12..16 reference identifier
            0, 0, 0, 0,
            // 16..24 reference timestamp
            0, 0, 0, 0, 0, 0, 0, 0,
            // 24..32 originate timestamp
            0, 0, 0, 0, 0, 0, 0, 0,
            // 32..40 receive timestamp
            0, 0, 0, 0, 0, 0, 0, 0,
            // 40..48 transmit timestamp
            // in the future this can be provided as an argument
            0, 0, 0, 0, 0, 0, 0, 0,
        ];
        let mut writer: UdpWriter<W5500> = w5500.udp_writer(self.sn)?;
        writer.write_all(&REQUEST_PKT)?;
        writer.send()?;
        Ok(())
    }
pub fn request < W5500 : Registers > ( & self , w5500 : & mut W5500 ) -> Result < ( ) , Error < W5500 :: Error > > { const LI : u8 = ( LeapIndicator :: NoWarning as u8 ) << 6 ; const VN : u8 = VERSION_NUMBER << 3 ; const MODE : u8 = Mode :: Client as u8 ; const STRATUM : u8 = 0 ; const POLL : u8 = 0 ; const PRECISION : u8 = 0 ; // https://www.rfc-editor.org/rfc/rfc4330.html#section-4 # [ rustfmt :: skip ] const REQUEST_PKT : [ u8 ; 48 ] = [ LI | VN | MODE , STRATUM , POLL , PRECISION , // 4..8 root relay 0 , 0 , 0 , 0 , // 8..12 root dispersion 0 , 0 , 0 , 0 , // 12..16 reference identifier 0 , 0 , 0 , 0 , // 16..24 reference timestamp 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 24..32 originate timestamp 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 32..40 receive timestamp 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 40..48 transmit timestamp // in the future this can be provided as an argument 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , ] ; let mut writer : UdpWriter < W5500 > = w5500 . udp_writer ( self . sn ) ? ; writer . write_all ( & REQUEST_PKT ) ? ; writer . send ( ) ? ; Ok ( ( ) ) }
Send a request to the SNTP server.
Send a request to the SNTP server .
&self
w5500
&mut W5500
&self
w5500
&mut W5500
errors
This method can only return.

[`Error::Other`]
[`Error::OutOfMemory`]
Sending a request requires 48 bytes of memory in the socket buffers.
This method can only return . [ ` Error :: Other ` ] [ ` Error :: OutOfMemory ` ] Sending a request requires 48 bytes of memory in the socket buffers .
example
None
let mut w5500 = w5500_regsim::w5500::default();


const SNTP_SRC_PORT: u16 = 123;
const SNTP_SERVER: SocketAddrV4 = SocketAddrV4::new(Ipv4Addr::new(216, 239, 35, 4), DST_PORT).

let sntp_client: Client = Client::new(Sn::Sn3, SNTP_SRC_PORT, SNTP_SERVER);
sntp_client.setup_socket(&mut w5500)?;
sntp_client.request(&mut w5500)?.
const SNTP_SRC_PORT : u16 = 123 ; const SNTP_SERVER : SocketAddrV4 = SocketAddrV4 :: new ( Ipv4Addr :: new ( 216 239 35 4 ) DST_PORT ) . let sntp_client : Client = Client :: new ( Sn :: Sn3 SNTP_SRC_PORT SNTP_SERVER ) ; sntp_client . setup_socket ( &mut w5500 ) ? ; sntp_client . request ( &mut w5500 ) ? .
ok::<(), w5500_hl::error<std::io::errorkind>>(())
None