Add broadcast support to socket

This commit is contained in:
Joebayld 2018-01-11 16:05:02 -05:00 committed by GitHub
parent 01f4eb2ff1
commit f247a76649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,9 @@ function EnttecODE(device_id, options) {
self.host = device_id || '127.0.0.1'
self.port = options.port || 6454
self.dev = dgram.createSocket('udp4')
self.dev.bind(function() {
self.dev.setBroadcast(true)
})
self.start()
}