struct updates
This commit is contained in:
17
server/structs/saprus.go
Normal file
17
server/structs/saprus.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package structs
|
||||
|
||||
import (
|
||||
)
|
||||
|
||||
type SaprusHeaderFrame struct {
|
||||
PacketType uint16
|
||||
Length uint16
|
||||
Payload []byte
|
||||
}
|
||||
|
||||
func (c SaprusHeaderFrame) Bytes() []byte {
|
||||
data := []byte{byte(c.PacketType), byte(c.Length)}
|
||||
data = append(data, c.Payload...)
|
||||
return data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user