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. Aug 09, 2024
  3. Oct 15, 2023
  4. Oct 13, 2023
  5. Oct 10, 2023
  6. Mar 07, 2023
  7. Feb 25, 2023
  8. Jan 30, 2023
    • Gus Eggert's avatar
      Fix dial panic when ctx is nil · 7fd61364
      Gus Eggert authored
      When the ctx is nil, http.NewRequestWithContext returns a "net/http:
      nil Context" error and a nil request. In this case, the dial function
      panics because it assumes the req is never nil. This checks the
      returning error and returns it, so that callers get an error instead
      of a panic in that scenario.
      7fd61364
  9. Jan 09, 2021
  10. Dec 23, 2020
    • Egor Gorbunov's avatar
      Do not lower header tokens in headerTokens() (#273) · e4c3b0f8
      Egor Gorbunov authored
      HTTP header values, as opposed to header keys,
      are case sensitive, but implementation of headerTokens()
      before this patch would return lowered values always.
      
      This old behavior could lead to chromium (v87) WebSocket
      rejecting connnection because negotiated subprotocol,
      returned in Sec-WebSocket-Protocol header (lowered
      be headerToken() function) would not match one sent
      by client, in case client specified value with capital
      letters.
      e4c3b0f8
  11. Sep 25, 2020
  12. Sep 24, 2020
  13. Sep 22, 2020
  14. May 18, 2020
  15. Apr 14, 2020
  16. Feb 18, 2020
  17. Feb 16, 2020
  18. Feb 09, 2020
  19. Nov 29, 2019
  20. Sep 22, 2019
  21. Sep 21, 2019
Loading