mock-socket
mock-socket copied to clipboard
Support query paremeter arguments on URL
I need to send some data from client to server with query parameter, but as I noticed client and server URL have to be the same. These extra data is differ for each client /?id=129&type=data
, maybe another req
parameter could be added to read the URL.
somethink like that:
wss.on('connection', (ws, req) => {});
Hey - we also ran into this issue today (cc @viggyfresh). If this is the case, it would at least be helpful to have this documented somewhere! Took us quite a bit of debugging and digging to figure out why things weren't working. Thanks!
This can be closed now that #271 is merged.
I think this is still an issue. #271 only fixed NetworkBridge.prototype.attachWebSocket
method, but my understanding of the code is that serverLookup
needs a similar fix for the client to find the server.