35 lines
618 B
Go
Raw Normal View History

2024-12-28 19:11:50 +01:00
package daemonconn
const (
MessageTypeEchoRequest = iota
MessageTypeEchoResponse
MessageTypeEchoUpdate
2024-12-28 19:11:50 +01:00
)
type EchoRequest struct {
EchoByte byte
UpdatesCount byte
2024-12-28 19:11:50 +01:00
}
func (EchoRequest) TypeID() uint32 {
return MessageTypeEchoRequest
}
type EchoResponse struct {
EchoByte byte
}
2024-12-28 19:11:50 +01:00
func (EchoResponse) TypeID() uint32 {
return MessageTypeEchoResponse
}
// EchoUpdate should be sent from the side, which received EchoRequest
// UpdatesCount times (which is specified in the EchoRequest message)
type EchoUpdate struct {
EchoByte byte
}
func (EchoUpdate) TypeID() uint32 {
return MessageTypeEchoUpdate
}