clean up tcp package; add Abort method

This commit is contained in:
soypat
2025-02-24 09:25:55 -03:00
parent d996040d92
commit d04d287ab6
6 changed files with 139 additions and 68 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ func (tfrm Frame) Payload() []byte {
// Segment returns the [Segment] representation of the TCP header and data length.
func (tfrm Frame) Segment(payloadSize int) Segment {
if payloadSize > math.MaxUint32 {
if payloadSize > math.MaxInt32 {
panic("TCP overflow payload size")
}
return Segment{