code: func (r *RequestCreateSessionV4) UnmarshalBinary(data []byte) error {
  	buf := bytes.NewBuffer(data)
  
  	fields := []*uint32{
  		&r.NumCapabilities,
  		&r.MaxPacketSize,
  		&r.Flags,
  		&r.Reserved,
  	}
  
  	for _, p := range fields {
  		err := binary.Read(buf, binary.LittleEndian, p)
  		if err != nil {
  			return err
  		}
  	}
  
  	for i := uint32(0); i < r.NumCapabilities; i++ {
  		var cap Capability
  		err := binary.Read(buf, binary.LittleEndian, &cap)
  		if err != nil {
  			return err
  		}
  
  		r.Capabilities = append(r.Capabilities, cap)
  	}
  
  	return nil
  }
docs: // UnmarshalBinary implements the encoding.BinaryUnmarshaler interface