1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-27 22:30:26 +08:00

完善路由表

This commit is contained in:
fumiama
2021-12-28 15:47:21 +08:00
parent a9abad93d3
commit c707e4d90a
7 changed files with 71 additions and 14 deletions

View File

@@ -44,8 +44,10 @@ func NewMe(privateKey *[32]byte, myIP string, myEndpoint string) (m Me) {
}
m.connections = make(map[string]*Link)
m.router = &Router{
routetable: make(map[string][]*Link),
list: make([]*net.IPNet, 1, 16),
table: make(map[string]*Link, 16),
}
m.router.SetDefault(nil)
return
}