fingerprint_debug.go 405 B

12345678910111213141516171819202122
  1. // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
  2. // SPDX-License-Identifier: MIT
  3. //go:build debug
  4. // +build debug
  5. package stun
  6. import "fmt"
  7. // CRCMismatch represents CRC check error.
  8. type CRCMismatch struct {
  9. Expected uint32
  10. Actual uint32
  11. }
  12. func (m CRCMismatch) Error() string {
  13. return fmt.Sprintf("CRC mismatch: %x (expected) != %x (actual)",
  14. m.Expected,
  15. m.Actual,
  16. )
  17. }