public static Region decodeRegion(KVMemoryStream stream) { int regionId = stream.ReadInt(); byte[] start = stream.ReadBytes(); byte[] end = stream.ReadBytes(); RegionStat stat = decodeRegionStat(stream); return new Region(regionId, start, end, stat); }
public static Region decodeRegion(KVMemoryStream stream) { int regionId = stream.ReadInt(); byte[] start = stream.ReadBytes(); byte[] end = stream.ReadBytes(); RegionStat stat = decodeRegionStat(stream); return(new Region(regionId, start, end, stat)); }
internal static int ReadGetResponse(Socket socket, out byte[] value) { using (KVMemoryStream stream = ReadResponse(socket)) { int len = stream.ReadInt(); int type = stream.ReadInt(); int retCode = stream.ReadInt(); int retry = stream.ReadByte(); int ttl = stream.ReadInt(); byte[] key = stream.ReadBytes(); value = stream.ReadBytes(); return(retCode); } }