Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

18 righe
387 B

  1. package mqtt
  2. // Values of Qos
  3. const (
  4. // QoS0 represents "QoS 0: At most once delivery".
  5. QoS0 byte = iota
  6. // QoS1 represents "QoS 1: At least once delivery".
  7. QoS1
  8. // QoS2 represents "QoS 2: Exactly once delivery".
  9. QoS2
  10. )
  11. // ValidQoS returns true if the input QoS equals to
  12. // QoS0, QoS1 or QoS2.
  13. func ValidQoS(qos byte) bool {
  14. return qos == QoS0 || qos == QoS1 || qos == QoS2
  15. }