Hi 
 
I did some further testing. It seems there there could be a limitation on
the number of sockets or connections made.
 
To speed up the failure result, I have setup a monitoring app that checks if
the socket is open every 2 seconds(connects and disconnects). After 30
minutes, I can no longer access the listening port, although Windows netstat
command still shows the port as open. The rebol app fails with the following
error:
 
** Access Error: Cannot connect to listen port
** Where: forever
** Near: append output-ports first listen
>>
 
Does it mean there is a problem with my rebol script or does my code not
release the every connection that is made. I have also noticed that the
memory usage for the rebol app is at 6Mb when it starts, but gradually grows
over time to 15-20MB. 
 
Thanks.

Best Regards
Leon Meyer



  _____  

From: Leon Meyer [mailto:[email protected]] 
Sent: Saturday, February 20, 2010 12:43 PM
To: '[email protected]'
Subject: Maximum number of listening ports


Hi 
 
We have been using a rebol script for a while now. Its main function is to
forwards a Multicast stream to any TCP listening ports.
The script works 100%, but if there are a large number of requests from a
remote PC to the listening port, the rebcore process seems to close the
listen port eventually. This could sometimes only happen after a couple of
days. Is there a limit on:
- the duration of the listen port being open?
- the number of requests that could made by the ?
 
Script:
REBOL [ Title: "4550"]
 
 mon-address: read make url! join "dns://" (read dns://)
 inputmulticast: open/direct/binary udp://:6550
 set-modes inputmulticast [multicast-groups: copy compose/deep[[239.2.0.81
(mon-address)]] ]
 
listen: open/direct/binary/no-wait tcp://:4550
output-ports: copy []
 
forever [
    port: wait [listen inputmulticast]
    case [
        port = listen [
            append output-ports first listen
        ]
        'else [
            data: copy inputmulticast
            foreach port output-ports [
                insert port data
            ]
        ]
    ]
 

Best Regards
Leon 



-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to