nobject 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee4d902fecae1f9b90bcd4d7d35004de2200204dc4ec69267ea96945e6336b45
4
- data.tar.gz: 2a89abb37e0f32b746eb347367e22877cf31bbb8c371a01a9e3dc4c5127be8e1
3
+ metadata.gz: becca136cc1adef1d1b8087c719d94d4cbe71a90e232602549cddd1bb0b91134
4
+ data.tar.gz: dbb1d283bc5e6e40c58d58e81807671db3d4d1507424c8f2ef1c7deb1c4fbf49
5
5
  SHA512:
6
- metadata.gz: c2d09b3192e694daa7a228dbc9ee265611091a75b8c8a9bec1cc883c4afbff0357213112df00efa28f2ecf481e94d79b69a020d56bcda8a546f004374990771a
7
- data.tar.gz: f353053268c9023bce7b8e13efe897dac8842a1ff7d7487f1ec22ce49d20a3f2b1dfc30f721f836cde35f442f138e4a645647f8a4174ce3b56c7d07bc89d491b
6
+ metadata.gz: e91cc194a9ada62d0bd0907994fe9e7f52db3d2996d52e2e3a032e966f80b80755451f53bf6ba2720266ede9ef9b22c4fc1ff1588b585ceefa6cf71e855e8862
7
+ data.tar.gz: 4790bad7b1667a0303e9a26545673048a1e2a38a2ee1e6795017af8a9129a33afe00ff770376219d3032a208994ba5db448ca05b15f9ff2db7ae1b66fb3f988d
data/lib/nobject/local.rb CHANGED
@@ -13,10 +13,11 @@ module Nobject
13
13
  # # this will create a new Nobject::Local, then push it to the specified
14
14
  # server Nobject::Local.new('localhost', 1234, <object>)
15
15
  def initialize(host, port, obj)
16
+ @msg_counter = 0
16
17
  @socket = TCPSocket.new(host, port)
17
18
  obj_bytes = Marshal.dump(obj)
18
19
 
19
- File.open('/tmp/nobject.log', 'a') {|f| f.puts "L:#{obj_bytes.length}"; f.flush }
20
+ File.open('/tmp/nobject.log', 'a') {|f| f.puts "L:#{@msg_counter += 1} #{obj_bytes.length}"; f.flush }
20
21
  @socket.send([obj_bytes.length].pack('Q>'), 0)
21
22
  @socket.send(obj_bytes, 0)
22
23
  end
@@ -27,7 +28,7 @@ module Nobject
27
28
 
28
29
  begin
29
30
  @socket.send([msg_bytes.length].pack('Q>'), 0)
30
- File.open('/tmp/nobject.log', 'a') {|f| f.puts " LMS:#{msg_bytes.length}"; f.flush }
31
+ File.open('/tmp/nobject.log', 'a') {|f| f.puts " LMS:#{@msg_counter += 1} #{msg_bytes.length}"; f.flush }
31
32
  @socket.send(msg_bytes, 0)
32
33
  rescue Exception
33
34
  raise Local::MethodRequestFailure.new("did not receive response from call to `#{method}' over the network")
@@ -6,7 +6,7 @@ module Nobject
6
6
  def initialize(socket)
7
7
  @socket = socket
8
8
  obj_size = @socket.recv(8).unpack('Q>').first
9
- File.open('/tmp/nobject.log', 'a') {|f| f.puts "R:#{obj_size}"; f.flush }
9
+ File.open('/tmp/nobject.log', 'a') {|f| f.puts "R:#{@msg_counter += 1} #{obj_size}"; f.flush }
10
10
  @obj = Marshal.load(@socket.recv(obj_size))
11
11
  end
12
12
 
@@ -14,7 +14,7 @@ module Nobject
14
14
  Thread.new do
15
15
  loop do
16
16
  msg_size = @socket.recv(8).unpack('Q>').first
17
- File.open('/tmp/nobject.log', 'a') {|f| f.puts " RMR:#{msg_size}"; f.flush }
17
+ File.open('/tmp/nobject.log', 'a') {|f| f.puts " RMR:#{@msg_counter += 1} #{msg_size}"; f.flush }
18
18
  msg = Marshal.load(@socket.recv(msg_size))
19
19
 
20
20
  result = @obj.send(msg[:method], *msg[:args])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nobject
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt