the readme mentions that websocket middleware can be called with rocky.useWs() but there isn't an example of doing anything useful (the example just calls next())
i'm trying to use rocky to log websocket messages
using nodejitsu's http-proxy (which i believe rocky is built on top of) i've used socket.on("data") during the upgrade to run a handler, but the data appears to be in a binary format. i'd like to be able to access the underlying text stream that i see in the client using devtools
using rocky, i haven't even gotten this far (i'm getting socket hang up errors). however, looking through the source i don't see any logic that appears to decode the binary stream. so i'm not spending effort to debug my rocky usage until i determine if the middleware support is truly middleware
does rocky support this usage ?
the use of "websocket middleware" suggests that it can. if not, the readme should be updated
side question ... if rocky can't do this, could you suggest another technique or tool to achieve my goal
the readme mentions that websocket middleware can be called with
rocky.useWs()
but there isn't an example of doing anything useful (the example just callsnext()
)i'm trying to use rocky to log websocket messages
using nodejitsu's
http-proxy
(which i believe rocky is built on top of) i've usedsocket.on("data")
during the upgrade to run a handler, but the data appears to be in a binary format. i'd like to be able to access the underlying text stream that i see in the client using devtoolsusing rocky, i haven't even gotten this far (i'm getting
socket hang up
errors). however, looking through the source i don't see any logic that appears to decode the binary stream. so i'm not spending effort to debug my rocky usage until i determine if the middleware support is truly middlewaredoes rocky support this usage ?
the use of "websocket middleware" suggests that it can. if not, the readme should be updated
side question ... if rocky can't do this, could you suggest another technique or tool to achieve my goal