websockify-js icon indicating copy to clipboard operation
websockify-js copied to clipboard

Accessing readyState of WebSocket Directly

Open bmcdorman opened this issue 12 years ago • 2 comments

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!

bmcdorman avatar Aug 10 '13 18:08 bmcdorman

Sorry about the late response. Providing an accessor is probably a good idea. If you're still interested, submit a pull request.

DirectXMan12 avatar Sep 23 '14 16:09 DirectXMan12

has this landed in any version ? :smiley:

cipri-tom avatar Oct 25 '16 13:10 cipri-tom