45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# File 'lib/aerospike/command/multi_command.rb', line 45
def parse_result
status = true
while status
@data_offset = 0
@compressed_data_buffer = nil
read_bytes(8)
size = @data_buffer.read_int64(0)
receive_size = size & 0xFFFFFFFFFFFF
compressed_sz = compressed_size
if compressed_sz
begin
@conn.read(@data_buffer, 8)
@conn.read(@data_buffer, compressed_sz - 8)
uncompressed = Zlib.inflate(@data_buffer.buf)
receive_size = uncompressed.size - 8
@compressed_data_buffer = Buffer.new(-1, uncompressed)
@compressed_data_offset = 0
@compressed_data_buffer.eat!(8)
rescue => e
Aerospike.logger.error("parse result error: #{e}")
raise e
end
end
status = if receive_size > 0
parse_group(receive_size)
else
false
end
end
end
|