relay packets
This commit is contained in:
@@ -9,14 +9,9 @@ const (
|
||||
REQ_REGISTER
|
||||
RESP_REGISTER
|
||||
REQ_DATA
|
||||
RESP_DATA
|
||||
)
|
||||
|
||||
func Uint16(v uint16) []byte {
|
||||
out := make([]byte, 2)
|
||||
binary.LittleEndian.PutUint16(out, v)
|
||||
return out
|
||||
}
|
||||
|
||||
func BuildPkt(pktType uint16, data []byte) []byte {
|
||||
out := make([]byte, 4+len(data))
|
||||
binary.LittleEndian.PutUint16(out[0:], PROTO_VERSION)
|
||||
|
||||
Reference in New Issue
Block a user