mirror of
https://github.com/soypat/lneto.git
synced 2026-09-02 21:09:04 +00:00
clean up tcp package; add Abort method
This commit is contained in:
+1
-1
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user