cakedb 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cakedb.rb +7 -7
- metadata +2 -2
data/lib/cakedb.rb
CHANGED
@@ -42,8 +42,6 @@ class CakeDB
|
|
42
42
|
#Issue the query
|
43
43
|
sid = get_sid(stream)
|
44
44
|
if tsend
|
45
|
-
puts ts
|
46
|
-
puts tsend
|
47
45
|
@server.write [18,mode,sid,ts,tsend].pack("L>S>S>Q>Q>")
|
48
46
|
else
|
49
47
|
@server.write [10,mode,sid,ts].pack("L>S>S>Q>")
|
@@ -72,14 +70,16 @@ class CakeDB
|
|
72
70
|
end
|
73
71
|
|
74
72
|
#recieve the data, header says how much
|
75
|
-
|
73
|
+
result[counter] = Hash.new
|
74
|
+
result[counter]["ts"] = header[0]
|
75
|
+
result[counter]["data"] = @server.recv(header[1])
|
76
76
|
|
77
77
|
#Keep reading till we have everything we expect
|
78
|
-
while(result[counter].bytesize < header[1])
|
79
|
-
result[counter] += @server.recv(header[1] -
|
80
|
-
puts "Incomplete read: #{
|
78
|
+
while(result[counter]["data"].bytesize < header[1])
|
79
|
+
result[counter]["data"] += @server.recv(header[1] - result[counter]["data"].bytesize)
|
80
|
+
puts "Incomplete read: #{result[counter]["data"].bytesize} / #{header[1]}"
|
81
81
|
end
|
82
|
-
if result[counter].bytesize != header[1]
|
82
|
+
if result[counter]["data"].bytesize != header[1]
|
83
83
|
puts "Incomplete read on payload receive"
|
84
84
|
puts "Raw Data: #{resultt[counter]}"
|
85
85
|
puts "Length: #{header[1]} bytes"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cakedb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -18,7 +18,7 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- lib/cakedb.rb
|
21
|
-
homepage: http://
|
21
|
+
homepage: http://github.com/cakedb/cakedb_ruby_driver
|
22
22
|
licenses: []
|
23
23
|
post_install_message:
|
24
24
|
rdoc_options: []
|