[REBOL] I think I've figured out IGMP...
From: pwoodward::cncdsl::com at: 23-Aug-2001 0:06
OK -
after some experimentation I think I've figured out how to handle multicasting in REBOL.
-=First instance of REBOL=-
1> Open a UDP "listener":
udp: open udp://:9999 ; from the docs
2> Use set-modes to "join" a multicast group:
set-modes udp [multicast-groups: [[224.0.1.89 your.ip.address.here]]]
3> Wait for incoming data...
print copy udp
-=Second instance of REBOL=-
Now - you probably want to send the listener some data...
1> Open a UDP "sender":
udp: open udp://224.0.1.89:9999
2> Send some data...
insert udp "test"
At this point, you should see the "test" appear in the first instance of REBOL. Now
- what's really pretty cool about this is that if you have REBOL running on one or more
systems - you can setup 2 or more listeners as described in the first portion - and data
sent by the "sender" in the second part should reach _all_ of them w/o you having to
explicitly address each of them!!!
Of course, this isn't exactly new - it's how streaming media multicasts have worked for
the last couple of years, along with Microsoft's own WINS... But - hey REBOL makes it
pretty easy. And here I thought I'd have a major struggle on my hands. Now to see if
I can cobble together a crude "streaming media" server or not with this sort of thing...
At least something like this should make a chat "room" style application easier (if
RIM isn't already using it).
- Porter Woodward