(p *Header, l int)
| 122 | } |
| 123 | |
| 124 | func checkPacketLength(p *Header, l int) error { |
| 125 | if int(p.MessageLength) > l { |
| 126 | return fmt.Errorf("cannot decode message of length %d from %d bytes", p.MessageLength, l) |
| 127 | } |
| 128 | return nil |
| 129 | } |
| 130 | |
| 131 | // headerMarshalBinaryTo is not a Header.MarshalBinaryTo to prevent all packets |
| 132 | // from having default (and incomplete) MarshalBinaryTo implementation through embedding |
no outgoing calls
no test coverage detected
searching dependent graphs…