Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

websocket middleware usage and examples needed, eg sniffing #110

Open
nqzero opened this issue Jul 3, 2017 · 2 comments
Open

websocket middleware usage and examples needed, eg sniffing #110

nqzero opened this issue Jul 3, 2017 · 2 comments

Comments

@nqzero
Copy link

nqzero commented Jul 3, 2017

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

@victorbucutea
Copy link

victorbucutea commented Aug 1, 2017

+1

Exactly the same problem. Also tried http-proxy package with the same outcome

@maikelmclauflin
Copy link

is this still an issue? i am just seeing a connection error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants