Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector - object is detecting routing changes on a PC. To avoid multiple notifications of multiple changes - the 'DelayBeforeNotify' is in use (notification will occur after 'DelayBeforeNotify' elapsed since last detected change)
func Create ¶
func Create() *Detector
Create - create new network change detector 'routingChangeChan' is a notification channel
func (*Detector) DelayBeforeNotify ¶
DelayBeforeNotify - To avoid multiple notifications of multiple changes - the 'DelayBeforeNotify' is in use (notification will occur after 'DelayBeforeNotify' elapsed since last detected change)
func (*Detector) Start ¶
func (d *Detector) Start(routingChangeChan chan<- struct{}, routingUpdateChan chan<- struct{}, currentDefaultInterface *net.Interface)
Start - start route change detector (asynchronous)
'routingChangeChan' is the channel for notifying when the default routing is NOT over the 'interfaceToProtect' anymore 'routingUpdateChan' is the channel for notifying when there were some routing changes but 'interfaceToProtect' is still is the default route
Click to show internal directories.
Click to hide internal directories.