websockify-js
websockify-js copied to clipboard
Accessing readyState of WebSocket Directly
Hi,
I'm currently using websockify to implement the Java networking stack for a javascript-based Java VM called Doppio.
I'm needing to directly access the readyState of the underlying WebSocket object that backs Websock. This information can be derived using the on* callbacks, but our javascript (unfortunately) might not let the browser event loop run for several seconds. readyState appears to be a quicker, easier, and more importantly synchronous way to get the same information. Implementing this accessor and exposing it via the API is trivial, but I was wanting to avoid forking and wanted your opinions regarding adding said accessor. If you all think it would be a positive upstream contribution, I can submit a pull request.
Thanks!
Sorry about the late response. Providing an accessor is probably a good idea. If you're still interested, submit a pull request.
has this landed in any version ? :smiley: