Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
456vv committed Nov 29, 2020
1 parent fc6ff2c commit fbccf45
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ func main() {
defer task.Close()
// false for multicast, true for broadcast
task.SetBroadcast(false)
// set local network ip, default use is 255.255.255.255
// set local network ip, can use is 255.255.255.255
localIP := "192.168.1.2"
if localIP != "" {
task.SetLocalIP(net.ParseIP(localIP))
if localIP == "" {
localIP = "255.255.255.255"
}
task.SetLocalIP(net.ParseIP(localIP))

log.Println("SmartConfig run.")
// smartconfig device num: 1
rList := task.ExecuteForResults(1)
Expand Down

0 comments on commit fbccf45

Please sign in to comment.