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. Apr 11, 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 20, 2023
  8. Oct 19, 2023
  9. Oct 14, 2023
  10. Oct 13, 2023
  11. Oct 10, 2023
  12. Jan 09, 2021
  13. May 18, 2020
  14. Feb 12, 2020
  15. Feb 09, 2020
  16. Dec 31, 2019
  17. Dec 19, 2019
  18. Nov 29, 2019
  19. Nov 06, 2019
    • Anmol Sethi's avatar
      Rename xor to mask · 3b6e614d
      Anmol Sethi authored
      3b6e614d
    • Anmol Sethi's avatar
      Optimize fastXOR with math/bits · a13f5dc8
      Anmol Sethi authored
      See https://github.com/golang/go/issues/31586#issuecomment-550040882
      
      Thanks @renthraysk
      
      benchmark                      old MB/s     new MB/s     speedup
      BenchmarkXOR/2/fast-8          470.88       492.61       1.05x
      BenchmarkXOR/3/fast-8          602.24       719.25       1.19x
      BenchmarkXOR/4/fast-8          718.82       1186.64      1.65x
      BenchmarkXOR/8/fast-8          1027.60      1718.71      1.67x
      BenchmarkXOR/16/fast-8         1413.31      3430.46      2.43x
      BenchmarkXOR/32/fast-8         2701.81      5585.42      2.07x
      BenchmarkXOR/128/fast-8        7757.97      13432.37     1.73x
      BenchmarkXOR/512/fast-8        15155.03     18797.79     1.24x
      BenchmarkXOR/4096/fast-8       20689.95     20334.61     0.98x
      BenchmarkXOR/16384/fast-8      21687.87     21613.94     1.00x
      
      Now its faster than basic XOR at every byte size greater than 2 on
      little endian amd64 machines.
      a13f5dc8
Loading