require "./spread.so"; 
# Establish new spread connection to a local spread daemon
# listening on port 4803.  We identiy ourselves as "bob"
a = Spread.new("3456", "bob"); # Establish new spread session to` 
i = 0
while(i < 10001)
	if(i.modulo(1000) == 0)
		puts i, " messages sent!\n"
	end
	# send a message to the group "flooder" with message "test"
	a.multicast("test", "flooder", Spread::RELIABLE_MESS)
	i = i.next
end
