#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 <protocol> <port>];
#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;
