mirror of
https://github.com/soypat/lneto.git
synced 2026-07-26 10:38:47 +00:00
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:
@@ -200,7 +200,7 @@ func run() error {
|
||||
|
||||
// Create blocking + Berkeley stack
|
||||
blocking := stack.StackBlocking(5 * time.Millisecond)
|
||||
berkeley := blocking.StackBerkeley(xnet.BerkeleyConfig{
|
||||
berkeley := blocking.StackGo(xnet.StackGoConfig{
|
||||
ListenerPoolConfig: xnet.TCPPoolConfig{
|
||||
PoolSize: flagPoolSize,
|
||||
QueueSize: 3,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user