12345678910111213 |
- package gatewayServer
- import "encoding/binary"
- func Bin2UInt16(buf []byte, order binary.ByteOrder) uint16 {
- return order.Uint16(buf)
- }
- func Uint16ToBin(i uint16, order binary.ByteOrder) []byte {
- buf := make([]byte, 2)
- order.PutUint16(buf, i)
- return buf
- }
|