Closed rwenergy closed 4 years ago
You shouldn't change anything if you want to connect to a different host. Just specify it in the connection's options:
const master = modbus.createMaster({
connection: {
type: 'tcp',
socketOptions: {
host: 'not-localhost.com',
port: 502
}
}
});
TCPConnection.js
I had to add this in my branch to connect to any other host than localhost. Is this a bug or feature?