syncthing/lib/protocol/hello_v0.13.go
Jakob Borg 944ddcf768
all: Become a Go module (fixes #5148) (#5384)
* go mod init; rm -rf vendor

* tweak proto files and generation

* go mod vendor

* clean up build.go

* protobuf literals in tests

* downgrade gogo/protobuf
2018-12-18 12:36:38 +01:00

25 lines
542 B
Go

// Copyright (C) 2016 The Protocol Authors.
//go:generate -command genxdr go run ../../repos/xdr/cmd/genxdr/main.go
//go:generate genxdr -o hello_v0.13_xdr.go hello_v0.13.go
package protocol
var (
Version13HelloMagic uint32 = 0x9F79BC40
)
type Version13HelloMessage struct {
DeviceName string // max:64
ClientName string // max:64
ClientVersion string // max:64
}
func (m Version13HelloMessage) Magic() uint32 {
return Version13HelloMagic
}
func (m Version13HelloMessage) Marshal() ([]byte, error) {
return m.MarshalXDR()
}