Open scarry1992 opened 5 years ago
This should be fixed, right?
@mcollina, do you read last comment in pr in websocket-stream? With cork logic first writing packet in stream separated for two socket frames. I would like your help for resolve it. I attached screenshots with callstacks of two writing operations.
Sorry I didn’t understood the problem or your comment. Can you rephrase it please, and maybe post a PR with a failing test?
Sorry, test was been written and he is passed. But testing pr with mqtt.js shows - every packet was been separated for two chunks. And I attached two screenshots for getting your help;)
I have no clue given those screenshots. I’ll need an example that say “yes/no” to check things out. This way to complex to debug for the time I have available.:
Ok then, I will attach example at Monday, ok?
sure!
Il giorno sab 6 apr 2019 alle 13:55 scarry1992 notifications@github.com ha scritto:
Ok then, I will attach example at Monday, ok?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/maxogden/websocket-stream/issues/146#issuecomment-480498160, or mute the thread https://github.com/notifications/unsubscribe-auth/AADL4-d3P_d0hivoli9dnV1RJODLWjiPks5veIsYgaJpZM4aRAIG .
So, about example for it, you can try to connect to some broker(with updated webaocket-stream to 5.4.0 version) and look at socket frames. That`s enought. And you see: First frame: Secont frame:
Can you paste the code of the server?
@mcollina, I can`t share code of my server, but test same with wss://iot.eclipse.org:443/ws
@mcollina, I mean using with mqtt.js
When I create a stream with option objectMode: false, I lose cork/uncork part of logic. That's happens in duplexify in https://github.com/maxogden/websocket-stream/blob/master/stream.js#L76. When I remove that initial stream by duplexify and leave stream = proxy only, everything works well. Can you tell me why you are doing stream by duplexify and what benefits it gives. And maybe I can help resolve this issue?