mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-09-14 09:32:30 +00:00
more peer migration
This commit is contained in:
@@ -64,11 +64,8 @@ func (r *router) init(core *Core) {
|
||||
},
|
||||
}
|
||||
p := r.core.peers.newPeer(&r.core.boxPub, &r.core.sigPub, &crypto.BoxSharedKey{}, &self, nil)
|
||||
p.out = func(packets [][]byte) {
|
||||
// TODO make peers and/or the switch into actors, have them pass themselves as the from field
|
||||
r.handlePackets(nil, packets)
|
||||
}
|
||||
r.out = p.handlePacket // TODO if the peer becomes its own actor, then send a message here
|
||||
p.out = func(packets [][]byte) { r.handlePackets(p, packets) }
|
||||
r.out = func(bs []byte) { p.handlePacketFrom(r, bs) }
|
||||
r.nodeinfo.init(r.core)
|
||||
r.core.config.Mutex.RLock()
|
||||
r.nodeinfo.setNodeInfo(r.core.config.Current.NodeInfo, r.core.config.Current.NodeInfoPrivacy)
|
||||
|
Reference in New Issue
Block a user