github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/tcp/option-mss.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package tcp 4 5 import ( 6 "../binary" 7 "../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 }