Esempio n. 1
0
func (o *AnnounceV1) decodeXDR(xr *xdr.Reader) error {
	o.Magic = xr.ReadUint32()
	o.Port = xr.ReadUint16()
	o.NodeID = xr.ReadStringMax(64)
	o.IP = xr.ReadBytesMax(16)
	return xr.Error()
}
Esempio n. 2
0
func (o *XDRBenchStruct) decodeXDR(xr *xdr.Reader) error {
	o.I1 = xr.ReadUint64()
	o.I2 = xr.ReadUint32()
	o.I3 = xr.ReadUint16()
	o.Bs0 = xr.ReadBytesMax(128)
	o.Bs1 = xr.ReadBytes()
	o.S0 = xr.ReadStringMax(128)
	o.S1 = xr.ReadString()
	return xr.Error()
}
Esempio n. 3
0
func (o *Node) decodeXDR(xr *xdr.Reader) error {
	o.ID = xr.ReadBytesMax(32)
	_AddressesSize := int(xr.ReadUint32())
	if _AddressesSize > 16 {
		return xdr.ErrElementSizeExceeded
	}
	o.Addresses = make([]Address, _AddressesSize)
	for i := range o.Addresses {
		(&o.Addresses[i]).decodeXDR(xr)
	}
	return xr.Error()
}
Esempio n. 4
0
func (o *Address) decodeXDR(xr *xdr.Reader) error {
	o.IP = xr.ReadBytesMax(16)
	o.Port = xr.ReadUint16()
	return xr.Error()
}
Esempio n. 5
0
func (o *Node) decodeXDR(xr *xdr.Reader) error {
	o.ID = xr.ReadBytesMax(32)
	o.Flags = xr.ReadUint32()
	o.MaxVersion = xr.ReadUint64()
	return xr.Error()
}
Esempio n. 6
0
func (o *BlockInfo) decodeXDR(xr *xdr.Reader) error {
	o.Size = xr.ReadUint32()
	o.Hash = xr.ReadBytesMax(64)
	return xr.Error()
}
Esempio n. 7
0
func (o *QueryV2) decodeXDR(xr *xdr.Reader) error {
	o.Magic = xr.ReadUint32()
	o.NodeID = xr.ReadBytesMax(32)
	return xr.Error()
}