mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 06:05:06 +03:00
Refactor admin socket somewhat, allow modules to set up their own handlers
This commit is contained in:
parent
8ef1978cb1
commit
d575b83ec1
4 changed files with 379 additions and 400 deletions
|
@ -196,6 +196,7 @@ func main() {
|
|||
if err := n.multicast.Start(); err != nil {
|
||||
logger.Errorln("An error occurred starting multicast:", err)
|
||||
}
|
||||
n.multicast.SetupAdminHandlers(&n.admin)
|
||||
// Start the TUN/TAP interface
|
||||
if listener, err := n.core.ConnListen(); err == nil {
|
||||
if dialer, err := n.core.ConnDialer(); err == nil {
|
||||
|
@ -203,6 +204,7 @@ func main() {
|
|||
if err := n.tuntap.Start(); err != nil {
|
||||
logger.Errorln("An error occurred starting TUN/TAP:", err)
|
||||
}
|
||||
n.tuntap.SetupAdminHandlers(&n.admin)
|
||||
} else {
|
||||
logger.Errorln("Unable to get Dialer:", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue