From fbccf45e4f34f982b85f8850e949457c0ffc9981 Mon Sep 17 00:00:00 2001 From: 456vv <123@456vv.com> Date: Sun, 29 Nov 2020 09:37:02 +0800 Subject: [PATCH] no message --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)