mirror of
https://github.com/soypat/lneto.git
synced 2026-09-13 10:09:31 +00:00
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:
@@ -5,12 +5,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/soypat/lneto/ethernet"
|
||||
"github.com/soypat/lneto/tcp"
|
||||
)
|
||||
|
||||
func TestTCPConn_SetDeadline_Established(t *testing.T) {
|
||||
const seed = 9999
|
||||
const MTU = 1500
|
||||
const MTU = ethernet.MaxMTU
|
||||
const svPort = 8080
|
||||
client, sv, clconn, svconn := newTCPStacks(t, seed, MTU)
|
||||
tst := testerFrom(t, MTU)
|
||||
@@ -37,7 +38,7 @@ func TestTCPConn_SetDeadline_Established(t *testing.T) {
|
||||
|
||||
func TestTCPConn_ReadDeadlineExceeded(t *testing.T) {
|
||||
const seed = 10001
|
||||
const MTU = 1500
|
||||
const MTU = ethernet.MaxMTU
|
||||
const svPort = 8080
|
||||
client, sv, clconn, svconn := newTCPStacks(t, seed, MTU)
|
||||
tst := testerFrom(t, MTU)
|
||||
@@ -63,7 +64,7 @@ func TestTCPConn_ReadDeadlineExceeded(t *testing.T) {
|
||||
|
||||
func TestTCPConn_WriteDeadlineExceeded(t *testing.T) {
|
||||
const seed = 10002
|
||||
const MTU = 1500
|
||||
const MTU = ethernet.MaxMTU
|
||||
const svPort = 8080
|
||||
client, sv, clconn, svconn := newTCPStacks(t, seed, MTU)
|
||||
tst := testerFrom(t, MTU)
|
||||
@@ -88,7 +89,7 @@ func TestTCPConn_WriteDeadlineExceeded(t *testing.T) {
|
||||
|
||||
func TestTCPConn_FlushEmptyNoop(t *testing.T) {
|
||||
const seed = 10003
|
||||
const MTU = 1500
|
||||
const MTU = ethernet.MaxMTU
|
||||
const svPort = 8080
|
||||
client, sv, clconn, svconn := newTCPStacks(t, seed, MTU)
|
||||
tst := testerFrom(t, MTU)
|
||||
|
||||
Reference in New Issue
Block a user