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

[REBOL] Re: UDP Multicast to TCP

From: compkarori::gmail at: 17-Nov-2009 23:54

It looks like you take the first connection and only deal with that one. You need to keep listening on tcpoutput for other incoming connections. You only check again when you get an error. On Wed, Nov 18, 2009 at 5:05 PM, Leon Meyer <lmeyer-bltech.co.za> 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 [ =A0error? 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 > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR.