lib/seapig/client.rb in seapig-client-0.1.0 vs lib/seapig/client.rb in seapig-client-0.1.1
- old
+ new
@@ -61,14 +61,14 @@
@socket.onopen {
puts 'Connected to seapig server'
@connected = true
@socket.send JSON.dump(action: 'client-options-set', options: @options)
@slave_objects.each_pair { |object_id, object|
- @socket.send JSON.dump(action: 'object-consumer-register', id: object_id, latest_known_version: object.version)
+ @socket.send JSON.dump(action: 'object-consumer-register', id: object_id, "known-version" => object.version)
}
@master_objects.each_pair { |object_id, object|
- @socket.send JSON.dump(action: 'object-producer-register', pattern: object_id)
+ @socket.send JSON.dump(action: 'object-producer-register', pattern: object_id, "known-version" => object.version)
}
@last_communication_at = Time.new.to_f
}
@socket.onmessage { |message|
@@ -257,9 +257,10 @@
message.merge!(old_version: 0, value: @shadow)
end
end
@server.socket.send JSON.dump(message)
end
+
end