Closed mobilarte closed 2 years ago
It is fine to use go-staticcheck
. I welcome the fixes. It would be great if you could integrate that into CI so everybody can follow it's advice. However, while it isn't integrated, please don't intersperse these type of fixes with other stuff - it polutes the set of changes with unrelated stuff and that is a bit annoying to review.
I completely understand your point, will not change any cosmetic stuff unless it is in a separate PR over the entire code. How can we integrate it into CI?
How can we integrate it into CI?
You would have to add a section in check.yaml. Please do it in a separate PR if you want to add it.
Why do you actually need multicast loopback support? It seems not very well fit for what you're trying to do, unless I misunderstand, because everybody receives their own transmissions - there is no separation of router and router client.
I would really like to see a test that enshrines what you're trying to do to make sure we keep that property.
If you have two programs running on the same machine, one being a sender only and one being a monitor only (to update knx device states), then the monitor will not receive the messages being sent out by the sender, unless it enables MulticastLoopback, but that is currently not possible because of ListenMulticastUDP
.
Hey, @mobilarte! Do you have time to address the remaining review items?
I merged this with the addition of a5260507cf35d299a5b426b062d8288881a6abe6 to make the post-send pause configurable.
The purpose of this PR is twofold:
net.ListenMulticastUDP("udp4", ifi, addr)
, therefore we usenet.ListenUDP("udp4", addr)
and join the multicast group. A new option which is false in theDefaultRouterConfig
has been added. In addition, when address is empty, the default KNX address is used.Plus a few dots and capitalizations (error strings should not be capitalized (ST1005) that's what go-staticcheck tells me).
Thank you.