go-teeworlds-protocol/messages7/ctrl_accept.go

49 lines
864 B
Go
Raw Normal View History

2024-06-20 05:27:46 +00:00
package messages7
import (
"slices"
"github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
"github.com/teeworlds-go/go-teeworlds-protocol/network7"
"github.com/teeworlds-go/go-teeworlds-protocol/packer"
2024-06-20 05:27:46 +00:00
)
type CtrlAccept struct {
Token [4]byte
}
func (msg *CtrlAccept) MsgId() int {
2024-06-20 05:27:46 +00:00
return network7.MsgCtrlAccept
}
func (msg *CtrlAccept) MsgType() network7.MsgType {
2024-06-20 05:27:46 +00:00
return network7.TypeControl
}
func (msg *CtrlAccept) System() bool {
2024-06-20 05:27:46 +00:00
return false
}
func (msg *CtrlAccept) Vital() bool {
2024-06-20 05:27:46 +00:00
return false
}
func (msg *CtrlAccept) Pack() []byte {
2024-06-20 05:27:46 +00:00
return slices.Concat(
[]byte{network7.MsgCtrlAccept},
msg.Token[:],
[]byte{512: 0},
)
}
func (msg *CtrlAccept) Unpack(u *packer.Unpacker) error {
return nil
2024-06-20 05:27:46 +00:00
}
func (msg *CtrlAccept) Header() *chunk7.ChunkHeader {
return nil
}
func (msg *CtrlAccept) SetHeader(header *chunk7.ChunkHeader) {
}