Skip to content

A golang library for detect when wifi changed(connected or disconnected or ssid changed)

License

Notifications You must be signed in to change notification settings

franzen/wifiNotifier

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wifiNotifier

Detect when wifi changed(connected or disconnected or ssid changed),current only support Windows & Mac OS

wifiNotifier 是一个可以监听 Wi-Fi 连接变化的库,当 wifi 连接或者断开连接或者 ssid 发生变化时都可以给出通知,当前支持 Windows 系统 和 Mac OS 系统

examples

package main

import (
	"log"

	"github.com/play175/wifiNotifier"
)

func main() {

	wifiNotifier.SetWifiNotifier(func(ssid string) {
		log.Println("onWifiChanged,current ssid:" + ssid)
	})

	log.Println("current ssid:" + wifiNotifier.GetCurrentSSID())

	for {

	}
}

About

A golang library for detect when wifi changed(connected or disconnected or ssid changed)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%