steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
275 stars 110 forks source link

ModbusTCPMaster: equals & hashCode method #123

Closed aDramaQueen closed 2 years ago

aDramaQueen commented 2 years ago

Hi there, i have a proposal: Could you write your own equals & hashCode method for the ModbusTCPMaster? If you connect with multiple threads to different devices, then those connections, which just have different unit IDs, can be used multiple times, since it's the same IP address. So I want to collect several masters in one map. For this to work efficiently, I need an "equals" & "hashCode" method. Thank you

steveohara commented 2 years ago

Pull requests are gratefully received :)

aDramaQueen commented 2 years ago

As you wish my lord. Pull request is already out.