本文整理匯總了Golang中github.com/calmh/xdr.Reader.ReadBytes方法的典型用法代碼示例。如果您正苦於以下問題:Golang Reader.ReadBytes方法的具體用法?Golang Reader.ReadBytes怎麽用?Golang Reader.ReadBytes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/calmh/xdr.Reader
的用法示例。
在下文中一共展示了Reader.ReadBytes方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: DecodeXDRFrom
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()
}
示例2: decodeXDR
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()
}
示例3: decodeXDR
func (o *ResponseMessage) decodeXDR(xr *xdr.Reader) error {
o.Data = xr.ReadBytes()
return xr.Error()
}
示例4: DecodeXDRFrom
func (o *ResponseMessage) DecodeXDRFrom(xr *xdr.Reader) error {
o.Data = xr.ReadBytes()
o.Code = int32(xr.ReadUint32())
return xr.Error()
}
示例5: DecodeXDRFrom
func (o *fileVersion) DecodeXDRFrom(xr *xdr.Reader) error {
(&o.version).DecodeXDRFrom(xr)
o.device = xr.ReadBytes()
return xr.Error()
}
示例6: decodeXDR
func (o *fileVersion) decodeXDR(xr *xdr.Reader) error {
o.version = int64(xr.ReadUint64())
o.device = xr.ReadBytes()
return xr.Error()
}
示例7: decodeXDR
func (o *address) decodeXDR(xr *xdr.Reader) error {
o.ip = xr.ReadBytes()
o.port = xr.ReadUint16()
o.seen = int64(xr.ReadUint64())
return xr.Error()
}