[PD] EOF on socket
Mathieu Bouchard
matju at artengine.ca
Thu Aug 18 22:40:25 CEST 2005
On Thu, 18 Aug 2005, nico wrote:
> here's my proc
> proc pd_send {all} {
> set to_pd [socket 127.0.0.1 40000]
> puts $to_pd $all
> flush $to_pd
> }
> proc vu {x} {
> pd_send "$x ;"
> }
> there's the ";" in vu
> if i don't close $to_pd , i get a message like
> netreceive : accept failed
> with close $to_pd
> if i ask for pd_send every 0.1s, it fail
> every 0.2s ,it's ok
Change it to:
set to_pd [socket 127.0.0.1 40000]
proc pd_send {all} {
global to_pd
puts $to_pd $all
flush $to_pd
}
proc vu {x} {
pd_send "$x;"
}
Because the way you do it with one open per message and no close, you are
using waaaaay too many sockets at once, which is causing a
denial-of-service attack on [netreceive].
____________________________________________________________________
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Pd-list
mailing list