Skip to content

Why send two 'Binary Message' when connect, can I configure that just send one 'Binary Message'? #1850

Closed Answered by robertsLando
ghzjtian asked this question in Q&A
Discussion options

You must be logged in to vote

@ghzjtian Firstly you are using a very old mqttjs version, latest now is 5.5.3. Try to use that first.

Writes to stream are handled by mqtt-packet, sincerly I have no clue why the connect is splitted in two binary messages. Some references in the code:

  1. Create the connect packet

this._writePacket(connectPacket)

  1. Write to stream

this._writePacket(connectPacket)

  1. Mqtt Packet connecct: https://github.com/mqttjs/mqtt-packet/blob/master/writeToStream.js#L217

@mcollina Any clue why this could happen?

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@mcollina
Comment options

@robertsLando
Comment options

@mcollina
Comment options

Answer selected by ghzjtian
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants