I want to send a hash populated with data from a EventMachine client to a server. The problem is that the server receive_date method just prints a string.
The server:
def receive_data(data)
send_data("Ready")
puts data[:total]
end
The client:
def receive_data(data)
send_data( get_memory() )
end
def get_memory
sigar = Sigar.new
mem = sigar.mem
swap = sigar.swap
memory = { :total => (mem.total / 1024), :cat => "kwiki", :mouse => "squeaky" }
end
This line: puts data[:total]
prints only nil