Closed kfuglsang closed 11 years ago
This is great, thanks for offering these patches. How do they compare to: https://github.com/mlinnen/MqttDotNet/commit/e832778b793168f341e70469fdc81bb24283bd18
I've been meaning to merge with that commit which supplies the same features. Can you see any advantages of yours over theirs or vice versa?
Thanks for the reply. I was not aware of an existing patch with that functionality. They are indeed very similar.
One difference that comes to mind is that my implementation extends the ConnectionResponse type with support for the "Bad username/password" or "Not authorized" responses from the server. Previously, the response would be parsed as Accepted and the client would then throw an exception on the first message publish.
Other than that, I think it is a matter of preference. I added the username/password to the constructor of the Mqtt class whereas mlinnen added it to the Connect method.
I finally got a chance to look over these changes and test them (at least superficially). They seem great, thanks a lot.
I added support for authentication via username/password as specified in the MQTT protocol. I had to update it to Visual Studio 2012 to modify it.
Tested with RabbitMQ 3.0.3's MQTT adapter.