Tcp buffer bug fix (#79)

* start working on tracking down tcp buffer bug

* mtu refactor

* modularize test

* more precise testing

* tests fail, but is it the failure we are looking for?

* fix typo in espradio link (#76)

* implement a new backoff abstraction (#75)

* rewrite backoff api

* rewrite tcp.Conn.Write

* keep fixing small things

* much better Conn.Read implementation

* fix critical overflow bug in internal.ConnRWBackoff

---------

Co-authored-by: Joel Wetzell <jwetzell@yahoo.com>
This commit is contained in:
Pat Whittingslow
2026-04-14 19:11:29 -03:00
committed by GitHub
parent 5bde7a9979
commit 75a812a8d7
22 changed files with 354 additions and 109 deletions
-8
View File
@@ -1,7 +1,5 @@
package lneto
import "time"
// StackNode is an abstraction of a packet exchanging protocol controller. This is the building block for all protocols,
// from Ethernet to IP to TCP, practically any protocol can be expressed as a StackNode and function completely.
// Today protocols represented by StackNode also include NTP, DNS, DHCP, ARP, ICMP, UDP, mDNS.
@@ -39,12 +37,6 @@ type StackNode interface {
// SetFlagPending(flagPending func(numPendingEncapsulations int))
}
// BackoffStrategy is the abstraction of a backoff strategy for retrying an operation.
// It returns the amount of time to sleep for. If returned value is 0 then runtime.Gosched is called.
// A negative value results in no action taken.
// consecutiveBackoffs starts at 1 and increments by 1 every time the operation is retried.
type BackoffStrategy func(consecutiveBackoffs int) (sleep time.Duration)
// IPProto represents the IP protocol number.
type IPProto uint8