ReadBytes return bytesData and the sum length of L、V in TLV
()
| 930 | |
| 931 | // ReadBytes return bytesData and the sum length of L、V in TLV |
| 932 | func (p *BinaryProtocol) ReadBytes() ([]byte, error) { |
| 933 | value, n, all := protowire.BinaryDecoder{}.DecodeBytes((p.Buf)[p.Read:]) |
| 934 | if n < 0 { |
| 935 | return emptyBuf[:], errDecodeField |
| 936 | } |
| 937 | _, err := p.next(all) |
| 938 | return value, err |
| 939 | } |
| 940 | |
| 941 | // ReadLength return dataLength, and move pointer in the begin of data |
| 942 | func (p *BinaryProtocol) ReadLength() (int, error) { |
no test coverage detected