bofeizhu / swift-nio-mqtt

MQTT v5.0 client powered by SwiftNIO.
Apache License 2.0
24 stars 7 forks source link

Extended configuration with clientId, username and password #57

Closed GerManMcBrain closed 4 years ago

GerManMcBrain commented 4 years ago

related to issue Set username, password and clientid in the configuration #56

bofeizhu commented 4 years ago

Hi @GerManMcBrain, thank you so much for your PR! After reviewing it, I feel it's not quite aligned with my design. I feel it's best to use the Configuration struct as the only source of truth for all the configurations. So func makeConnectPacket() and other functions should load the configurations, e.g. username, password from the configuration object of the client, instead of loading them from function arguments. Do you mind refactoring those parts? If you feel it's too much work and don't mind waiting for 3-4 days, I planned to extend the Configuration myself this weekend.

bofeizhu commented 4 years ago

@GerManMcBrain I'm closing this PR in favor of #58. Thank you so much for your input!