[REBOL] Re: Maximum number of listening ports
From: compkarori:gm:ail at: 22-Feb-2010 2:07
What happens if you close each port as it opens .. does it affect the
number of connections?
On Mon, Feb 22, 2010 at 6:33 PM, Leon Meyer <lmeyer-bltech.co.za> wrote:
> 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
>
> =A0_____
>
> From: Leon Meyer [mailto:lmeyer-bltech.co.za]
> Sent: Saturday, February 20, 2010 12:43 PM
> To: 'rebolist-rebol.com'
> 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"]
>
> =A0mon-address: read make url! join "dns://" (read dns://)
> =A0inputmulticast: open/direct/binary udp://:6550
> =A0set-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 [
> =A0 =A0port: wait [listen inputmulticast]
> =A0 =A0case [
> =A0 =A0 =A0 =A0port = listen [
> =A0 =A0 =A0 =A0 =A0 =A0append output-ports first listen
> =A0 =A0 =A0 =A0]
> =A0 =A0 =A0 =A0'else [
> =A0 =A0 =A0 =A0 =A0 =A0data: copy inputmulticast
> =A0 =A0 =A0 =A0 =A0 =A0foreach port output-ports [
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0insert port data
> =A0 =A0 =A0 =A0 =A0 =A0]
> =A0 =A0 =A0 =A0]
> =A0 =A0]
>
> Best Regards
> Leon
>
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
--
Graham Chiu
http://www.compkarori.co.nz:8090/
Synapse - the use from anywhere EMR.