Merge pull request #41 from Joebayld/patch-2
Add broadcast support to socket
This commit is contained in:
commit
bb393fe30c
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,9 @@ function EnttecODE(device_id, options) {
|
||||||
self.host = device_id || '127.0.0.1'
|
self.host = device_id || '127.0.0.1'
|
||||||
self.port = options.port || 6454
|
self.port = options.port || 6454
|
||||||
self.dev = dgram.createSocket('udp4')
|
self.dev = dgram.createSocket('udp4')
|
||||||
|
self.dev.bind(function() {
|
||||||
|
self.dev.setBroadcast(true)
|
||||||
|
})
|
||||||
self.start()
|
self.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue