Closed saransh14 closed 9 months ago
AFAIK by default its not going to work properly, because socket bound at the operating system level is owned by first client instance. I recall that a while ago there was issue in bacnet4j project to begin supporting SO_REUSEADDR options: https://github.com/MangoAutomation/BACnet4J/issues/1#issuecomment-541089441
While wrapper does not support withReuseAddress
option, you can try initializing wrapper with IpNetwork
created manually and see if it will fly.
Thanks for the confirmation @splatch. Closing the issue as the information is received.
I think we can keep it open, if bacnet4j supports that we can pull one more option to propagate this setting and shade calls to IpNetworkBuilder
.
Sure @splatch please let me know once it is available in the library, post that I'll integrate it with my service to handle this use case.
Hi @splatch , any tentative date by when can I expect the support to be available in the library, so that I can extend the same for my use case?
Hi @splatch , thanks for sharing the reference link to the issue from MangoAutomation/BACnet4J library. I've used the same way of creating IpNetwork using the withReuseAddress
and then created BacnetIpClient, and was able to create multiple clients using that way on same broadcastAddress.
Thanks for your help.
Hello @saransh14, I've added one liner for this issue and another for bug I found. I'll cut a new release once we get back mango automation maven repository server (see MangoAutomation/BACnet4J#86).
Hi @splatch , the release build is failing on Github actions, can you please look into it.
Yeah, there were some changes in infrastructure. Will address it today.
Release 1.3.0-beta1 is on its way to maven central. The release build and maven central validation have passed. Artifacts should be available within hour or so.
Hi @splatch, Hope you're doing good.
I'm trying to solve a use case where I want to create two different
BacNetIpClient
on the same broadcast address, but with different clientID. Following is the method that I'm using to generated 'BacNetIpClient` BacNetIpClient client1 = new BacNetIpClient(broadcastAddress, "2002"); BacNetIpClient client2 = new BacNetIpClient(broadcastAddress, "2003");For client2, I'm getting error while starting the client using
client2.start()
asUnable to initialize client
.Could you please let me know if we can create 2 BACnet client on same address but with different client IDs?