I need three separate MODBUS slave servers listening on three different interfaces. Right now in file ModbusSlaveTCP.java:
synchronized public void listenImpl() throws ModbusIOException {
try {
server = new ServerSocket(tcp.getPort());
will respond to requests from any interface. I want this:
synchronized public void listenImpl() throws ModbusIOException {
try {
server = new ServerSocket(tcp.getPort(),100,tcp.getHost());
but don't want to screw the library up. Thinking that if tcp.getHost() returns something other than 0.0.0.0 then do the one that restricts the interface. The 100 is a default backlog, we could default it to 10 and add a constructor to TcpParameters to specify it if it comes to that.
Thoughts? I can do a pull for this, I am actively working a project with a short deadline... First thought was to just change it then go back and do it right!
I need three separate MODBUS slave servers listening on three different interfaces. Right now in file ModbusSlaveTCP.java:
will respond to requests from any interface. I want this:
but don't want to screw the library up. Thinking that if tcp.getHost() returns something other than 0.0.0.0 then do the one that restricts the interface. The 100 is a default backlog, we could default it to 10 and add a constructor to TcpParameters to specify it if it comes to that.
Thoughts? I can do a pull for this, I am actively working a project with a short deadline... First thought was to just change it then go back and do it right!