Ejemplo n.º 1
0
func (o *TestStruct) DecodeXDRFrom(xr *xdr.Reader) error {
	o.I = int(xr.ReadUint64())
	o.I8 = int8(xr.ReadUint8())
	o.UI8 = xr.ReadUint8()
	o.I16 = int16(xr.ReadUint16())
	o.UI16 = xr.ReadUint16()
	o.I32 = int32(xr.ReadUint32())
	o.UI32 = xr.ReadUint32()
	o.I64 = int64(xr.ReadUint64())
	o.UI64 = xr.ReadUint64()
	o.BS = xr.ReadBytesMax(1024)
	o.S = xr.ReadStringMax(1024)
	(&o.C).DecodeXDRFrom(xr)
	_SSSize := int(xr.ReadUint32())
	if _SSSize < 0 {
		return xdr.ElementSizeExceeded("SS", _SSSize, 1024)
	}
	if _SSSize > 1024 {
		return xdr.ElementSizeExceeded("SS", _SSSize, 1024)
	}
	o.SS = make([]string, _SSSize)
	for i := range o.SS {
		o.SS[i] = xr.ReadString()
	}
	return xr.Error()
}
Ejemplo n.º 2
0
func (o *SessionInvitation) DecodeXDRFrom(xr *xdr.Reader) error {
	o.From = xr.ReadBytesMax(32)
	o.Key = xr.ReadBytesMax(32)
	o.Address = xr.ReadBytesMax(32)
	o.Port = xr.ReadUint16()
	o.ServerSocket = xr.ReadBool()
	return xr.Error()
}
Ejemplo n.º 3
0
func (o *XDRBenchStruct) DecodeXDRFrom(xr *xdr.Reader) error {
	o.I1 = xr.ReadUint64()
	o.I2 = xr.ReadUint32()
	o.I3 = xr.ReadUint16()
	o.I4 = xr.ReadUint8()
	o.Bs0 = xr.ReadBytesMax(128)
	o.Bs1 = xr.ReadBytes()
	o.S0 = xr.ReadStringMax(128)
	o.S1 = xr.ReadString()
	return xr.Error()
}
func (o *TestStruct) decodeXDR(xr *xdr.Reader) error {
	o.I = int(xr.ReadUint64())
	o.I8 = int8(xr.ReadUint8())
	o.UI8 = xr.ReadUint8()
	o.I16 = int16(xr.ReadUint16())
	o.UI16 = xr.ReadUint16()
	o.I32 = int32(xr.ReadUint32())
	o.UI32 = xr.ReadUint32()
	o.I64 = int64(xr.ReadUint64())
	o.UI64 = xr.ReadUint64()
	o.BS = xr.ReadBytes()
	o.S = xr.ReadString()
	(&o.C).decodeXDR(xr)
	return xr.Error()
}
Ejemplo n.º 5
0
func (o *Address) decodeXDR(xr *xdr.Reader) error {
	o.IP = xr.ReadBytesMax(16)
	o.Port = xr.ReadUint16()
	return xr.Error()
}
Ejemplo n.º 6
0
func (o *address) decodeXDR(xr *xdr.Reader) error {
	o.ip = xr.ReadBytes()
	o.port = xr.ReadUint16()
	o.seen = int64(xr.ReadUint64())
	return xr.Error()
}