good morning!!!!

Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/nhooyr/websocket. Pull mirroring updated .
  1. Jan 30, 2025
    • Iñigo Garcia Olaizola's avatar
      feat: add ping and pong received callbacks (#509) · 703784f0
      Iñigo Garcia Olaizola authored
      This change adds two optional callbacks to both `DialOptions` and
      `AcceptOptions`. These callbacks are invoked synchronously when a ping
      or pong frame is received, allowing advanced users to log or inspect
      payloads for metrics or debugging. If the callback needs to perform more
      complex work or reuse the payload outside the callback, it is
      recommended to perform processing in a separate goroutine.
      
      The boolean return value of `OnPingReceived` is used to determine if the
      subsequent pong frame should be sent. If `false` is returned, the pong
      frame is not sent.
      
      Fixes #246
      703784f0
  2. Dec 04, 2024
  3. Aug 09, 2024
  4. Apr 09, 2024
    • Jacob's avatar
      Use new atomic types from Go 1.19 · afe94af9
      Jacob authored
      This is a cleaner solution for the fix in #438 thanks to the fact that Go 1.19 now is the default and the atomic.Int64 types are automatically aligned correctly on 32 bit systems.
      
      Using this also means that xsync.Int64 can be removed. The new atomic.Int64 type solves the issue and should be quite a lot faster as it avoids the interface conversion.
      afe94af9
  5. Apr 07, 2024
  6. Apr 05, 2024
  7. Oct 26, 2023
  8. Oct 19, 2023
  9. Oct 13, 2023
  10. Oct 10, 2023
  11. Feb 25, 2023
  12. Apr 10, 2021
  13. Apr 07, 2021
    • Anmol Sethi's avatar
      Fix DOS attack from malicious pongs · 129d3035
      Anmol Sethi authored
      A double channel close panic was possible if a peer sent back multiple
      pongs for every ping.
      
      If the second pong arrived before the ping goroutine deleted its channel
      from the map, the channel would be closed twice and so a panic would
      ensue.
      
      This fixes that by having the read goroutine send on the ping
      goroutine's channel rather than closing it.
      
      Reported via email by Tibor Kálmán @kalmant
      
      Please update to the new release ASAP!
      129d3035
  14. Jan 09, 2021
  15. Apr 14, 2020
  16. Feb 20, 2020
  17. Feb 18, 2020
  18. Feb 16, 2020
  19. Feb 13, 2020
  20. Feb 12, 2020
  21. Feb 09, 2020
Loading