From 78ba52c352b7a9aefb7a145249e89cb11964266e Mon Sep 17 00:00:00 2001 From: Roman Haefeli Date: Fri, 13 Apr 2012 06:20:43 +0000 Subject: added 5th outlet to [tcpsocketserver] svn path=/trunk/externals/mrpeach/; revision=16122 --- net/tcpsocketserver.pd | 217 +++++++++++++++++++++++++------------------------ 1 file changed, 111 insertions(+), 106 deletions(-) diff --git a/net/tcpsocketserver.pd b/net/tcpsocketserver.pd index 3e8f8dd..e6ed91c 100644 --- a/net/tcpsocketserver.pd +++ b/net/tcpsocketserver.pd @@ -1,106 +1,111 @@ -#N canvas 332 12 333 552 10; -#X declare -stdpath extra/mrpeach; -#X obj 13 39 inlet; -#X obj 13 464 outlet; -#X obj 75 463 outlet; -#X obj 137 463 outlet; -#X obj 199 462 outlet; -#X obj 36 187 list trim; -#X obj 59 145 list trim; -#X obj 59 124 list prepend socket; -#X obj 36 166 list prepend num_of_clients; -#X obj 82 103 list trim; -#X obj 82 82 list prepend ip; -#N canvas 816 227 247 348 \$0.TCPSOCKETCONTAINER 0; -#X restore 14 372 pd \$0.TCPSOCKETCONTAINER; -#N canvas 491 218 502 504 socketmanager 0; -#X msg 24 196 \$1 reset; -#X obj 25 259 route done; -#X obj 5 175 t a a b; -#X msg 25 280 0; -#X msg 44 280 1; -#X obj 5 303 spigot; -#X obj 44 344 f; -#X obj 76 344 + 20; -#X obj 5 323 t a b b; -#X obj 24 365 list append \$1; -#X obj 24 388 list append; -#X obj 5 412 list append; -#X obj 5 476 s pd-\$0.TCPSOCKETCONTAINER; -#X obj 5 432 list append \$0; -#X obj 5 24 route socket num_of_clients; -#X obj 84 46 t a a; -#X obj 69 73 -; -#X obj 69 94 == 1; -#X obj 5 122 spigot; -#X obj 5 3 r \$0.TCPSOCKET; -#X obj 24 217 s \$0.TCPSOCKET; -#X obj 25 238 r \$0.TCPSOCKET; -#X msg 5 454 obj 10 \$3 tcpsocket.\$2 \$4 \$1 \, loadbang; -#X obj 5 148 t a b; -#X msg 65 132 0; -#X text 116 78 when a new client connects (num_of_clients: +1); -#X text 119 197 send a 'reset' to the according socket handler; -#X text 114 266 and if it doesn't respond (which means \, there is -no socket handler on specified socket) \,; -#X text 119 368 create one (into pd-\$0.TCPSOCKETCONTAINER).; -#X connect 0 0 20 0; -#X connect 1 0 3 0; -#X connect 2 0 5 0; -#X connect 2 1 0 0; -#X connect 2 2 4 0; -#X connect 3 0 5 1; -#X connect 4 0 5 1; -#X connect 5 0 8 0; -#X connect 6 0 7 0; -#X connect 6 0 10 1; -#X connect 7 0 6 1; -#X connect 8 0 11 0; -#X connect 8 1 9 0; -#X connect 8 2 6 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 13 0; -#X connect 13 0 22 0; -#X connect 14 0 18 0; -#X connect 14 1 15 0; -#X connect 15 0 16 1; -#X connect 15 1 16 0; -#X connect 16 0 17 0; -#X connect 17 0 18 1; -#X connect 18 0 23 0; -#X connect 19 0 14 0; -#X connect 21 0 1 0; -#X connect 22 0 12 0; -#X connect 23 0 2 0; -#X connect 23 1 24 0; -#X connect 24 0 18 1; -#X restore 14 349 pd socketmanager; -#X obj 13 60 tcpserver \$2; -#X obj 13 417 r \$0.TCPSOCKET; -#X obj 13 208 list prepend in; -#X obj 13 440 route out num_of_clients socket.out ip.out; -#X obj 13 230 list trim; -#X obj 82 316 s \$0.TCPSOCKET; -#X text 23 501 Author: Roman Haefeli; -#X text 24 518 Version: 2009-01-11; -#X text 94 292 [tcpsocketserver ]; -#X obj 13 14 declare -stdpath extra/mrpeach; -#X connect 0 0 13 0; -#X connect 5 0 18 0; -#X connect 6 0 18 0; -#X connect 7 0 6 0; -#X connect 8 0 5 0; -#X connect 9 0 18 0; -#X connect 10 0 9 0; -#X connect 13 0 15 0; -#X connect 13 1 8 0; -#X connect 13 2 7 0; -#X connect 13 3 10 0; -#X connect 14 0 16 0; -#X connect 15 0 17 0; -#X connect 16 0 1 0; -#X connect 16 1 2 0; -#X connect 16 2 3 0; -#X connect 16 3 4 0; -#X connect 17 0 18 0; +#N canvas 332 53 333 552 10; +#X obj 13 9 inlet; +#X obj 13 464 outlet; +#X obj 71 463 outlet; +#X obj 129 463 outlet; +#X obj 187 462 outlet; +#X obj 30 207 list trim; +#X obj 47 165 list trim; +#X obj 47 144 list prepend socket; +#X obj 30 186 list prepend num_of_clients; +#X obj 64 123 list trim; +#X obj 64 102 list prepend ip; +#N canvas 816 227 247 348 \$0.TCPSOCKETCONTAINER 0; +#X restore 14 372 pd \$0.TCPSOCKETCONTAINER; +#N canvas 491 218 502 504 socketmanager 0; +#X msg 24 196 \$1 reset; +#X obj 25 259 route done; +#X obj 5 175 t a a b; +#X msg 25 280 0; +#X msg 44 280 1; +#X obj 5 303 spigot; +#X obj 44 344 f; +#X obj 76 344 + 20; +#X obj 5 323 t a b b; +#X obj 24 365 list append \$1; +#X obj 24 388 list append; +#X obj 5 412 list append; +#X obj 5 476 s pd-\$0.TCPSOCKETCONTAINER; +#X obj 5 432 list append \$0; +#X obj 5 24 route socket num_of_clients; +#X obj 84 46 t a a; +#X obj 69 73 -; +#X obj 69 94 == 1; +#X obj 5 122 spigot; +#X obj 5 3 r \$0.TCPSOCKET; +#X obj 24 217 s \$0.TCPSOCKET; +#X obj 25 238 r \$0.TCPSOCKET; +#X msg 5 454 obj 10 \$3 tcpsocket.\$2 \$4 \$1 \, loadbang; +#X obj 5 148 t a b; +#X msg 65 132 0; +#X text 116 78 when a new client connects (num_of_clients: +1); +#X text 119 197 send a 'reset' to the according socket handler; +#X text 114 266 and if it doesn't respond (which means \, there is +no socket handler on specified socket) \,; +#X text 119 368 create one (into pd-\$0.TCPSOCKETCONTAINER).; +#X connect 0 0 20 0; +#X connect 1 0 3 0; +#X connect 2 0 5 0; +#X connect 2 1 0 0; +#X connect 2 2 4 0; +#X connect 3 0 5 1; +#X connect 4 0 5 1; +#X connect 5 0 8 0; +#X connect 6 0 7 0; +#X connect 6 0 10 1; +#X connect 7 0 6 1; +#X connect 8 0 11 0; +#X connect 8 1 9 0; +#X connect 8 2 6 0; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 13 0; +#X connect 13 0 22 0; +#X connect 14 0 18 0; +#X connect 14 1 15 0; +#X connect 15 0 16 1; +#X connect 15 1 16 0; +#X connect 16 0 17 0; +#X connect 17 0 18 1; +#X connect 18 0 23 0; +#X connect 19 0 14 0; +#X connect 21 0 1 0; +#X connect 22 0 12 0; +#X connect 23 0 2 0; +#X connect 23 1 24 0; +#X connect 24 0 18 1; +#X restore 14 349 pd socketmanager; +#X obj 13 30 tcpserver \$2; +#X obj 13 417 r \$0.TCPSOCKET; +#X obj 13 228 list prepend in; +#X obj 13 250 list trim; +#X obj 82 316 s \$0.TCPSOCKET; +#X text 23 501 Author: Roman Haefeli; +#X text 94 292 [tcpsocketserver ]; +#X obj 82 78 list trim; +#X obj 82 57 list prepend status; +#X obj 13 440 route out num_of_clients socket.out ip.out status; +#X text 24 518 Version: 2012-04-13; +#X obj 245 461 outlet; +#X connect 0 0 13 0; +#X connect 5 0 17 0; +#X connect 6 0 17 0; +#X connect 7 0 6 0; +#X connect 8 0 5 0; +#X connect 9 0 17 0; +#X connect 10 0 9 0; +#X connect 13 0 15 0; +#X connect 13 1 8 0; +#X connect 13 2 7 0; +#X connect 13 3 10 0; +#X connect 13 4 21 0; +#X connect 14 0 22 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 20 0 17 0; +#X connect 21 0 20 0; +#X connect 22 0 1 0; +#X connect 22 1 2 0; +#X connect 22 2 3 0; +#X connect 22 3 4 0; +#X connect 22 4 24 0; -- cgit v1.2.1