10 Protocol [4]byte // "HTXF" 0x48545846
11 ReferenceNumber [4]byte // Unique ID generated for the transfer
12 DataSize [4]byte // File size
13 RSVD [4]byte // Not implemented in Hotline Protocol
16 var HTXF = [4]byte{0x48, 0x54, 0x58, 0x46} // (HTXF) is the only supported transfer protocol
18 func (tf *transfer) Write(b []byte) (int, error) {
19 if err := binary.Read(bytes.NewReader(b), binary.BigEndian, tf); err != nil {
23 if tf.Protocol != HTXF {
24 return 0, errors.New("invalid protocol")