From fc6ff2c5e0131ff846736468f58722ed9eb07059 Mon Sep 17 00:00:00 2001 From: 456vv <123@456vv.com> Date: Sun, 29 Nov 2020 09:35:07 +0800 Subject: [PATCH] no message --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 3c378a8..178db5c 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,11 @@ 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 + localIP := "192.168.1.2" + if localIP != "" { + task.SetLocalIP(net.ParseIP(localIP)) + } log.Println("SmartConfig run.") // smartconfig device num: 1 rList := task.ExecuteForResults(1)