adjust link packet logic so they bypass the lifo stack and are delivered first

This commit is contained in:
Arceliar 2018-06-06 17:44:10 -05:00
parent bbae9ff8e8
commit 690d29435d
4 changed files with 36 additions and 29 deletions

View file

@ -55,7 +55,7 @@ func (r *router) init(core *Core) {
}
}
r.in = in
r.out = func(packet []byte) { p.handlePacket(packet, nil) } // The caller is responsible for go-ing if it needs to not block
r.out = func(packet []byte) { p.handlePacket(packet) } // The caller is responsible for go-ing if it needs to not block
recv := make(chan []byte, 32)
send := make(chan []byte, 32)
r.recv = recv