aboutsummaryrefslogtreecommitdiffstats
path: root/packet/command/bad/bad.go
blob: dfab5dea29bf0df4a26727feeacc7fc9faa52db8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package bad

import (
	"github.com/osm/quake/common/buffer"
	"github.com/osm/quake/common/context"
	"github.com/osm/quake/protocol"
)

type Command struct {
	Type protocol.CommandType
}

func (cmd *Command) Bytes() []byte {
	return []byte{byte(cmd.Type)}
}

func Parse(ctx *context.Context, buf *buffer.Buffer, typ protocol.CommandType) (*Command, error) {
	return &Command{Type: typ}, nil
}