Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: I think I've figured out IGMP...

From: m:koopmans2:chello:nl at: 23-Aug-2001 6:46

Porter, Please be aware that a lot of routers don't support multicast. This is what makes it hard to do that kind of applications. Most streaming media apps use their own TCP based protocol, I think. Of course on Intranets you may not have this problem, and REBOLs elegance always helps! --Maarten
> 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).