Пример #1
0
func (o Device) XDRSize() int {
	return 4 + len(o.ID) + xdr.Padding(len(o.ID)) +
		4 + len(o.Name) + xdr.Padding(len(o.Name)) +
		4 + xdr.SizeOfSlice(o.Addresses) + 4 +
		4 + len(o.CertName) + xdr.Padding(len(o.CertName)) + 8 + 4 +
		4 + xdr.SizeOfSlice(o.Options)
}
Пример #2
0
func (o ClusterConfigMessage) XDRSize() int {
	return 4 + len(o.DeviceName) + xdr.Padding(len(o.DeviceName)) +
		4 + len(o.ClientName) + xdr.Padding(len(o.ClientName)) +
		4 + len(o.ClientVersion) + xdr.Padding(len(o.ClientVersion)) +
		4 + xdr.SizeOfSlice(o.Folders) +
		4 + xdr.SizeOfSlice(o.Options)
}
Пример #3
0
func (o TestStruct) XDRSize() int {
	return 4 + 8 + 4 + 4 + 4 + 4 + 4 + 4 + 8 + 8 +
		4 + len(o.BS) + xdr.Padding(len(o.BS)) +
		4 + len(o.S) + xdr.Padding(len(o.S)) +
		o.C.XDRSize() +
		4 + xdr.SizeOfSlice(o.SS) +
		o.ES.XDRSize() +
		o.OS.XDRSize() +
		4 + xdr.SizeOfSlice(o.OSs)
}
Пример #4
0
func (o Folder) XDRSize() int {
	return 4 + len(o.ID) + xdr.Padding(len(o.ID)) +
		4 + len(o.Label) + xdr.Padding(len(o.Label)) +
		4 + xdr.SizeOfSlice(o.Devices) + 4 +
		4 + xdr.SizeOfSlice(o.Options)
}
Пример #5
0
func (o DownloadProgressMessage) XDRSize() int {
	return 4 + len(o.Folder) + xdr.Padding(len(o.Folder)) +
		4 + xdr.SizeOfSlice(o.Updates) + 4 +
		4 + xdr.SizeOfSlice(o.Options)
}
Пример #6
0
func (o ClusterConfigMessage) XDRSize() int {
	return 4 + xdr.SizeOfSlice(o.Folders) +
		4 + xdr.SizeOfSlice(o.Options)
}
Пример #7
0
func (o IndexMessage) XDRSize() int {
	return 4 + len(o.Folder) + xdr.Padding(len(o.Folder)) +
		4 + xdr.SizeOfSlice(o.Files) + 4 +
		4 + xdr.SizeOfSlice(o.Options)
}
Пример #8
0
func (o RequestMessage) XDRSize() int {
	return 4 + len(o.Folder) + xdr.Padding(len(o.Folder)) +
		4 + len(o.Name) + xdr.Padding(len(o.Name)) + 8 + 4 +
		4 + len(o.Hash) + xdr.Padding(len(o.Hash)) + 4 +
		4 + xdr.SizeOfSlice(o.Options)
}
Пример #9
0
func (o FileInfo) XDRSize() int {
	return 4 + len(o.Name) + xdr.Padding(len(o.Name)) + 4 + 8 +
		o.Version.XDRSize() + 8 +
		4 + xdr.SizeOfSlice(o.Blocks)
}
Пример #10
0
func (o VersionList) XDRSize() int {
	return 4 + xdr.SizeOfSlice(o.versions)
}
Пример #11
0
func (o Announce) XDRSize() int {
	return 4 +
		o.This.XDRSize() +
		4 + xdr.SizeOfSlice(o.Extra)
}
Пример #12
0
func (o Device) XDRSize() int {
	return 4 + len(o.ID) + xdr.Padding(len(o.ID)) +
		4 + xdr.SizeOfSlice(o.Addresses) +
		4 + xdr.SizeOfSlice(o.Relays)
}