Add proper berkeley interface as StackBerkeley (#63)

* switcheroo: StackBerkeley now StackGo and added proper berkeley interface as StackBerkeley

* minor nits

* remove host name resolution

* further improve API and documentation

* xnet/stack: fix a few small errors in logic

Signed-off-by: deadprogram <ron@hybridgroup.com>

* add mutex and small fix

* fix: correct checking for integer max

Signed-off-by: deadprogram <ron@hybridgroup.com>

---------

Signed-off-by: deadprogram <ron@hybridgroup.com>
Co-authored-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
Pat Whittingslow
2026-03-31 14:03:30 -03:00
committed by GitHub
parent 33f492557a
commit 22f29fdfb1
4 changed files with 441 additions and 157 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ func run(ctx context.Context, stack *xnet.StackAsync) error {
return fmt.Errorf("resolving router MAC: %w", err)
}
stack.SetGateway6(gateway)
berkstack := stack.StackBlocking(pollTime).StackBerkeley(xnet.BerkeleyConfig{
berkstack := stack.StackBlocking(pollTime).StackGo(xnet.StackGoConfig{
ListenerPoolConfig: xnet.TCPPoolConfig{
PoolSize: tcpConnPoolSize,
QueueSize: tcpPacketQueueSize,