good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 703784f0 authored by Iñigo Garcia Olaizola's avatar Iñigo Garcia Olaizola Committed by GitHub
Browse files

feat: add ping and pong received callbacks (#509)

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
parent aec630d5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment