ping results not working as I would expect, but maybe I should be using differently #56
Replies: 2 comments
-
Hi, this was a bug in the ping/various other Websocket methods which were performing the correct operation but not returning the proper boolean type as specified in the documentation. Some methods actually did not support the boolean property yet under the hood but I have just went back and confirmed everything with the uWebsockets.js documentation and implemented ternary operators to ensure all methods return the expected types. Update to v5.8.2 to see if your problem is resolved. |
Beta Was this translation helpful? Give feedback.
-
Nice, updated to latest version and got the Boolean response as shown in this image for ping |
Beta Was this translation helpful? Give feedback.
-
Hi I am attempting to use ping method with websockets from the docs, however, it continually gets undefined returned:
When I use ws.send with 'ping' it works as expected. But I was expecting a boolean true or false if ws.ping was used. Below is example for how I was using comparing send vs ping
This is with two client connections where I see the ws.send ping on the clients, so would expect client websocket protocol to return pong results from the ws.ping method. Appreciate any guidance
Beta Was this translation helpful? Give feedback.
All reactions