| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
It seems the tests I added are flaky. I'm investigating this. |
Sorry, something went wrong.
I've found the problem. newConnTest returns the two connections in a random order. I'm fixing the test to account for this. |
Sorry, something went wrong.
|
pingPongReceived test is passing now, but it seems there is an unrelated test (TestWasm) that is failing here and in other PRs. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the pull request! Looks great, I just had some questions/concerns about the ping received payload modifications.
Sorry, something went wrong.
There was a problem hiding this comment.
This looks great and the docs are well written too, thanks! Once the data race in the tests is fixed, I believe this is good to go 👍🏻
Sorry, something went wrong.
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. Tests confirm that the ping/pong callbacks are invoked as expected. References coder#246
|
It looks like we are now encountering an issue related to wasmbrowsertest and timeouts. I'm trying to update it to the latest version to see if that resolves the problem. This repo had a similar issue, and it looks like they fixed it by updating the version as well: hajimehoshi/ebiten#2982 [edit] Moved the fix attempt to a new PR: #514 |
Sorry, something went wrong.
CI is passing now. Feel free to merge this. We can discuss the flaky TestWasm here (#514), as it is unrelated to this PR change. |
Sorry, something went wrong.
There was a problem hiding this comment.
Awesome, thanks for the contribution!
Sorry, something went wrong.
|
Hi, This is great. Any info on when the next release will be? Thanks to all the maintainers and contributors! |
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add ping and pong received callbacks
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.
Tests confirm that the ping/pong callbacks are invoked as expected.
Fixes #246
Closes #307