Add round-robin implementation (#66)

* add handler.encapsulateNode

* implement round robin handler approach

* simplify round robin implementation

* leave TODO

* internet.node touch up

* fix conflict resolve f-up

* replace certain ErrShortBuffer with ErrTruncatedFrame error
This commit is contained in:
Pat Whittingslow
2026-04-09 09:36:17 -03:00
committed by GitHub
parent ec44889896
commit 63f7870fe5
21 changed files with 104 additions and 70 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ func (s *StackAsync) RegisterUDP(node lneto.StackNode, remoteAddr []byte, remote
defer s.mu.Unlock()
idx := len(s.userUDPs)
if idx >= cap(s.userUDPs) {
return lneto.ErrBufferFull
return lneto.ErrExhausted
}
s.userUDPs = s.userUDPs[:idx+1]
s.userUDPs[idx].SetStackNode(node, remoteAddr, remotePort)