constants.rs 447 B

12345678910111213141516
  1. use backoff::ExponentialBackoff;
  2. use std::time::Duration;
  3. // FIXME: Determine reasonable size
  4. /// UDP MTU. Currently far larger than necessary
  5. pub const UDP_BUFFER_SIZE: usize = 2048;
  6. pub const UDP_SENDQ_SIZE: usize = 1024;
  7. pub const UDP_TIMEOUT: u64 = 60;
  8. pub fn listen_backoff() -> ExponentialBackoff {
  9. ExponentialBackoff {
  10. max_elapsed_time: None,
  11. max_interval: Duration::from_secs(1),
  12. ..Default::default()
  13. }
  14. }