[REBOL] Re: UDP Multicast to TCP
From: david:may10:ntlworld at: 18-Nov-2009 7:38
Hello Leon,
Wednesday, November 18, 2009, 4:05:26 AM, you wrote:
> Hi
>
> This is my first post. I only discovered Rebol a couple of days ago, and
> wow, I love it!
>
> I need some help though with something that I am sure of is very basic, but
> I have been struggling to get it right.
>
> I am converting an incoming UDP stream to TCP. The TCP is forwarded to
> anyone that connects to the TCP port. It works perfectly for our application
> on the local PC.
>
> Here is the code:
>
> REBOL [ Title: "Multicast Receiver"]
>
> mon-address: read make url! join "dns://" (read dns://)
> inputmulticast: open udp://:6554
> set-modes inputmulticast [multicast-groups: copy compose/deep [[239.2.0.81
> (mon-address)]] ]
>
> tcpoutput: open/direct/no-wait tcp://:4554
>
> forever [
> tcp: first tcpoutput
> until [ error? try [
> receive: wait inputmulticast
> insert tcp copy receive
> ]
> ]
> close tcp
> ]
> The problem is that it does not work with multiple incoming requests, only
> with one. The other tcp ports are able to connect, but they do not receive
> any data. Only the first client session receives the data. I do not need to
> wait for an input from the client to start forwarding the data, hence the
> absence of the "wait tcp".
>
> I use multiple telnet sessions to the open TCP port.
>
> I have tried to create a server as described in
> http://www.rebol.net/cookbook/recipes/0034.html but I cannot get it to work.
> This cookbook example also includes the "wait waitports" which we need to
> exclude as we need to push data to the client as soon as it connects.
>
> Any input on how would you need to go about pushing a TCP data stream to
> multiple connected client ports at the same time.
>
> Thank you
> Leon
>
welcome Lean.
it seems even after all this time the regulars have not seen fit to
make regular use of Multitasking capability's of rebol but there is
hope one day they may be convinced of its benefit inside tunneled overlays
for the general web/net use point to multi-point etc :)
you might find Alfred Began's really Old fully working rebol multitasking scripts
useful and interesting to look at
http://www.rebolfrance.info/org/articles/multicast/multicast.html
it needs translation from french to English but his rebol scripts are
generic and he did us all a favour by putting them in side a sip and
keeping it available all time time so grab them and be happy.
i really do wonder what ever happened to him and his interesting
sample code idea's for Multicast though , shame hes not around
innovating today that i can find, but i dont read french so perhaps
hes around still and we have missed masses of interesting rebol code
from him and his efforts...
heres a babblefish and a goggle translate of that page to make it
effortless for any interested readers and Multicast rebol coders, WE
NEED FAR MORE inventive working coders here that understand rebol at
its most innovative so keep up the good work ;)
http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2Fwww.rebolfrance.info%2Forg%2Farticles%2Fmulticast%2Fmulticast.html&lp=fr_en&btnTrUrl=Translate
http://translate.google.com/translate?js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fwww.rebolfrance.info%2Forg%2Farticles%2Fmulticast%2Fmulticast.html&sl=fr&tl=en
and finally you may also find a use for this yet again old, yet
innovative use for stuffing Multicast down the Internet pipes
ohh for the the lack of the MBONE and the innovators there that wrote such
innovations, if only they could inspire a new generation today
http://www.cdt.luth.se/~peppar/progs/mTunnel/
multicast Tunnel - mTunnel
--------------------------------------------------------------------------------
The mTunnel is an application that tunnels multicast packets over an Unicast UDP channel.
Several multicast streams can be sent over the same tunnel while the tunnel will still
only use one port.
This is useful if tunneling through a firewall.
The applications primary goal is to allow for easy tunneling of multicast over for instance
a modem and/or an ISDN connection.
The mTunnel has a built in Web-server allowing for easy access to information about current
tunnels.
This server listens by default on port 9000 on the machine where started.
The mTunnel also listens on session announcements for easier tunneling of known sessions.
If you download and install this package please send me an email! :-) (peppar-cdt.luth.se)
The latest public version is 0.3 released 980102.
README Changelog
Download: Windows UNIX
This version is NOT compatible with earlier versions of mTunnel!
I have also written two papers about this application: Paper1 - 1998 Paper2 - 1997
--
Best regards,
david mailto:david.may10-ntlworld.com