// writeTo the InnerHeader to the given io.Writer
writeTo the InnerHeader to the given io.Writer
// writeTo the InnerHeader to the given io . Writer
func (ih *InnerHeader) writeTo(w io.Writer) error {
	irsID := make([]byte, 4)
	binary.LittleEndian.PutUint32(irsID, ih.InnerRandomStreamID)
	if err := writeToInnerHeader(w, InnerHeaderIRSID, irsID); err != nil {
		return err
	}
	if err := writeToInnerHeader(w, InnerHeaderIRSKey, ih.InnerRandomStreamKey); err != nil {
		return err
	}
	for _, item := range ih.Binaries {
		buf := []byte{item.MemoryProtection}
		buf = append(buf, item.Content...)
		if err := writeToInnerHeader(w, InnerHeaderBinary, buf); err != nil {
			return err
		}
	}
	if err := binary.Write(w, binary.LittleEndian, InnerHeaderTerminator); err != nil {
		return err
	}
	return binary.Write(w, binary.LittleEndian, uint32(0))
}
func ( ih * InnerHeader ) writeTo ( w io . Writer ) error { irsID := make ( [ ] byte , 4 ) binary . LittleEndian . PutUint32 ( irsID , ih . InnerRandomStreamID ) if err := writeToInnerHeader ( w , InnerHeaderIRSID , irsID ) ; err != nil { return err } if err := writeToInnerHeader ( w , InnerHeaderIRSKey , ih . InnerRandomStreamKey ) ; err != nil { return err } for _ , item := range ih . Binaries { buf := [ ] byte { item . MemoryProtection } buf = append ( buf , item . Content ... ) if err := writeToInnerHeader ( w , InnerHeaderBinary , buf ) ; err != nil { return err } } if err := binary . Write ( w , binary . LittleEndian , InnerHeaderTerminator ) ; err != nil { return err } return binary . Write ( w , binary . LittleEndian , uint32 ( 0 ) ) }
writeTo the InnerHeader to the given io.Writer
writeTo the InnerHeader to the given io . Writer
// End inner header