multicast¶ ↑
Ruby library and command line utils for multicasting
This project is very young so some things might not work.
Install¶ ↑
gem install multicast
Listening¶ ↑
Command Line¶ ↑
mclisten -g 224.0.1.33 -p 4567
Code¶ ↑
listener = Multicast::Listener.new(:group => "224.0.1.33", :port => 4567) listener.listen do |message| puts "---> [#{message.hostname} / #{message.ip}:#{message.port} (#{message.message.size} bytes)] #{message.message}" end
Sending¶ ↑
Command Line¶ ↑
mcsend -g 224.0.1.33 -p 4567 -m "Multicasting like a champ"
Code¶ ↑
sender = Multicast::Sender.new(:group => "224.0.1.33", :port => 4567) sender.send("Multicasting like a champ")
Contact¶ ↑
Copyright¶ ↑
Copyright © 2010 Marshall Huss. See LICENSE for details.