diff --git a/README.md b/README.md index 178db5c..f5703e7 100644 --- a/README.md +++ b/README.md @@ -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)