Berkeley rework (#62)

* begin reworking berkeley stack and add example

* thread mock client logic

* fix mock stack in example not encapsulating when data available
This commit is contained in:
Pat Whittingslow
2026-03-25 18:43:10 -03:00
committed by GitHub
parent faae7ab076
commit e08aab7c0a
3 changed files with 425 additions and 5 deletions
+3 -1
View File
@@ -30,6 +30,8 @@ import (
"github.com/soypat/lneto/x/xnet"
)
const pollTime = 5 * time.Millisecond
var softRand = time.Now().Unix()
func main() {
@@ -180,7 +182,7 @@ func run() (err error) {
clear(buf[:nwrite])
// Poll before read if interface supports it, to avoid blocking indefinitely.
ready, err := tryPoll(iface, 5*time.Millisecond)
ready, err := tryPoll(iface, pollTime)
if err != nil {
log.Fatal("goroutine poll:", err)
}