musique/server/proto/hosts.go
2022-12-15 00:28:36 +01:00

25 lines
398 B
Go

package proto
type HostsResponseEntry struct {
Nick string
Address string
Version string
}
type HostsResponse struct {
Hosts []HostsResponseEntry
}
func Hosts() (req Request) {
req.Version = Version
req.Type = "hosts"
return
}
func SynchronizeHosts(response HostsResponse) (req Request) {
req.HostsResponse = response
req.Version = Version
req.Type = "synchronize-hosts"
return
}