hi, i recently stumbled upon some weird behaviour when i tried to
connect 2 computers via netsend using the TCP protocol.
this is on Windows 7 / 64bit, PD 0.49.0:
so i hooked up 2 PCs with a network cable and fixed IP addresses.
everything works fine. i can ping, i can send udp data to and from.
but now comes the weird situation:
when i try to connect with a TCP protocol to a valid IP address, but the
port on the other machine is not yet opened (i.e. no [netreceive] has
been created on the other computer), then my local PD freezes for about
20 (!) seconds before printing an error to the console.
if i try to connect to a "localhost" non-existing port, there's still a
small PD freeze but only for about 1 second.
also irritating is the fact, that an invalid connection doesn't output a
0 on the left output, but instead does nothing. only the [disconnect(
message outputs a 0.
i would expect a non existing connection (whether it's because of an
invalid IP-address or a wrong port number) to just immediately output an
error on the console AND output a 0 on the left output of [netsend], right ?
i am no expert in this field, so it might be that this behaviour is
normal, though it doesn't seem right to me to stall a program for 20
seconds because of a worng network connection. i also experienced this
behaviour with iemnet's [tcpsend] and [tcpclient].
i attached a patch with the described scenarios.
thanks for any help or wisdom !
best
oliver
--
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
/////////////// http://pendler.klingt.org //////////////
\\\\\\\\\\\\\\\ http://oliver.klingt.org \\\\\\\\\\\\\\
////////////////////////////////////////////////////////
#N canvas 441 357 685 385 10;
#X obj 37 311 netsend;
#X msg 37 41 connect localhost 3000;
#X msg 46 289 send foo \$1;
#X floatatom 46 262 0 0 0 0 - - -;
#X msg 37 234 disconnect;
#X floatatom 37 338 0 0 0 0 - - -;
#X text 80 12 TCP \, ascii;
#X obj 76 337 print backward;
#X msg 37 176 connect 169.254.34.130 5555;
#X msg 37 124 connect 10.0.0.9 5555;
#X obj 194 311 netreceive 3000;
#X obj 194 335 print REC;
#X msg 37 68 connect localhost 4000;
#X text 187 40 if present: immediate connection \, left outlet = 1
;
#X text 114 232 left outlet = 0;
#X text 186 67 if not present: 1 second freeze \, left outlet = no
change;
#X msg 37 103 connect 192.254.34.130 5555;
#X text 221 101 if IP address not present: no freeze \, left outlet
= no change, f 28;
#X text 220 163 if IP address present \, but no [netreceive] on other
machine: 20 seconds freeze on local PD before error in console \, left
outlet = no change;
#X connect 0 0 5 0;
#X connect 0 1 7 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 4 0 0 0;
#X connect 8 0 0 0;
#X connect 9 0 0 0;
#X connect 10 0 11 0;
#X connect 12 0 0 0;
#X connect 16 0 0 0;
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list