code: func (b TCP) EncodePartial(partialChecksum, length uint16, seqnum, acknum uint32, flags byte, rcvwnd uint16) {
  	// Add the total length and "flags" field contributions to the checksum.
  	// We don't use the flags field directly from the header because it's a
  	// one-byte field with an odd offset, so it would be accounted for
  	// incorrectly by the Checksum routine.
  	tmp := make([]byte, 4)
  	binary.BigEndian.PutUint16(tmp, length)
  	binary.BigEndian.PutUint16(tmp[2:], uint16(flags))
  	checksum := Checksum(tmp, partialChecksum)
  
  	// Encode the passed-in fields.
  	b.encodeSubset(seqnum, acknum, flags, rcvwnd)
  
  	// Add the contributions of the passed-in fields to the checksum.
  	checksum = Checksum(b[TCPSeqNumOffset:TCPSeqNumOffset+8], checksum)
  	checksum = Checksum(b[TCPWinSizeOffset:TCPWinSizeOffset+2], checksum)
  
  	// Encode the checksum.
  	b.SetChecksum(^checksum)
  }
docs: // EncodePartial updates a subset of the fields of the tcp header. It is useful
  // in cases when similar segments are produced.