github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/tcp/option-mss.go (about) 1 /* For license and copyright information please see the LEGAL file in the code repository */ 2 3 package tcp 4 5 import ( 6 "github.com/GeniusesGroup/libgo/binary" 7 "github.com/GeniusesGroup/libgo/protocol" 8 ) 9 10 /* 11 type optionMSS struct { 12 Length byte 13 MSS uint16 // Max Segment Length 14 } 15 */ 16 type optionMSS []byte 17 18 func (o optionMSS) Length() byte { return o[0] } 19 func (o optionMSS) MSS() uint16 { return binary.BigEndian.Uint16(o[1:]) } 20 func (o optionMSS) NextOption() []byte { return o[3:] } 21 22 func (o optionMSS) Process(s *Socket) (err protocol.Error) { 23 return 24 }