mirror of
https://github.com/CPunch/gopenfusion.git
synced 2025-11-06 23:50:20 +00:00
misc. refactoring
This commit is contained in:
@@ -22,10 +22,10 @@ type Packet struct {
|
||||
|
||||
const PACK_ALIGN = 4
|
||||
|
||||
func NewPacket(sz int) *Packet {
|
||||
func NewPacket(buf []byte) *Packet {
|
||||
pkt := &Packet{
|
||||
ByteOrder: binary.LittleEndian,
|
||||
Buf: make([]byte, sz),
|
||||
Buf: buf,
|
||||
cursor: 0,
|
||||
}
|
||||
return pkt
|
||||
|
||||
Reference in New Issue
Block a user