Skip to content

Commit

Permalink
tcpserver-help: add 'META' info
Browse files Browse the repository at this point in the history
  • Loading branch information
umlaeute committed Mar 14, 2024
1 parent ef6ea89 commit d199150
Showing 1 changed file with 59 additions and 57 deletions.
116 changes: 59 additions & 57 deletions tcpserver-help.pd
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
#N canvas 237 158 909 679 12;
#X floatatom 118 419 5 0 0 0 connections - -;
#X floatatom 142 449 5 0 0 0 socket - -;
#X floatatom 166 499 3 0 0 0 from - -;
#X floatatom 193 499 3 0 0 0 - - -;
#X floatatom 220 499 3 0 0 0 - - -;
#X floatatom 247 499 3 0 0 0 - - -;
#N canvas 85 132 909 679 12;
#X floatatom 118 419 5 0 0 0 connections - - 0;
#X floatatom 142 449 5 0 0 0 socket - - 0;
#X floatatom 166 499 3 0 0 0 from - - 0;
#X floatatom 193 499 3 0 0 0 - - - 0;
#X floatatom 220 499 3 0 0 0 - - - 0;
#X floatatom 247 499 3 0 0 0 - - - 0;
#X msg 95 50 broadcast 1 2 3;
#X text 212 48 send to all clients;
#X text 202 385 argument is port number;
#X text 92 610 ***WARNING*** Attempting to print long messages can
hang pd!;
#X text 92 610 ***WARNING*** Attempting to print long messages can hang pd!;
#X obj 95 550 spigot;
#X obj 134 530 tgl 15 0 empty empty enable_print 17 7 0 10 -24198 -258699
-45076 0 1;
#X obj 134 530 tgl 15 0 empty empty enable_print 17 7 0 10 #14e814 #fc2828 #2c004c 0 1;
#X obj 95 386 tcpserver 9997;
#X text 21 6 [tcpserver] waits for clients to connect to its port.
;
#X text 21 6 [tcpserver] waits for clients to connect to its port.;
#X text 94 593 Received messages are output as stream of bytes;
#X obj 95 573 print tcpserver:received;
#X msg 120 75 11 216 43;
#X obj 324 548 spigot;
#X obj 363 528 tgl 15 0 empty empty enable_print 17 7 0 10 -24198 -258699
-45076 0 1;
#X obj 363 528 tgl 15 0 empty empty enable_print 17 7 0 10 #14e814 #fc2828 #2c004c 0 1;
#X obj 324 574 print tcpserver:status;
#N canvas 6 61 450 300 per.socket 0;
#X msg 93 154 disconnectsocket \$1;
#X floatatom 111 108 5 0 0 0 - - -;
#X floatatom 111 108 5 0 0 0 - - - 0;
#X obj 93 131 f;
#X obj 93 112 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -241291
-1;
#X obj 93 112 bng 15 250 50 0 empty empty empty 17 7 0 10 #fc2828 #e8e828 #000000;
#X msg 123 184 send 504 1 2 3;
#X text 233 183 send to client on socket 504;
#X text 242 153 disconnect by socket number;
Expand All @@ -41,10 +36,9 @@ hang pd!;
#X restore 157 225 pd per.socket;
#N canvas 6 61 492 322 per.client 0;
#X msg 20 81 disconnectclient \$1;
#X floatatom 38 32 5 0 0 0 - - -;
#X floatatom 38 32 5 0 0 0 - - - 0;
#X obj 20 57 f;
#X obj 20 38 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -241291
-1;
#X obj 20 38 bng 15 250 50 0 empty empty empty 17 7 0 10 #fc2828 #e8e828 #000000;
#X msg 75 136 client;
#X msg 50 111 client 1;
#X text 118 110 get state of client 1;
Expand Down Expand Up @@ -74,10 +68,8 @@ hang pd!;
#X msg 133 156 targetsocket 7;
#X text 245 154 per default \, send only to client on socket 7;
#X msg 143 186 targetsocket -504;
#X text 272 186 per default \, send to all clients but the one on socket
504;
#X text 120 41 per default \, send to all connected clients (aka 'broadcast')
;
#X text 272 186 per default \, send to all clients but the one on socket 504;
#X text 120 41 per default \, send to all connected clients (aka 'broadcast');
#X obj 106 268 s \$0.tcpserver;
#X connect 0 0 12 0;
#X connect 1 0 12 0;
Expand All @@ -86,65 +78,61 @@ hang pd!;
#X connect 7 0 12 0;
#X connect 9 0 12 0;
#X restore 157 202 pd default.targets;
#X text 194 79 without specified method 'broadcast' is assumed (see
default.targets);
#X text 194 79 without specified method 'broadcast' is assumed (see default.targets);
#N canvas 352 180 881 841 getting.info 0;
#X floatatom 99 162 5 0 0 1 to_client - -;
#X floatatom 390 165 3 0 0 1 socket - -;
#X symbolatom 422 140 15 0 0 1 ip - -;
#X floatatom 359 189 5 0 0 1 client - -;
#X floatatom 454 115 7 0 0 1 port - -;
#X floatatom 180 117 5 0 0 1 on_socket - -;
#X floatatom 139 141 5 0 0 1 sentsize[bytes] - -;
#X floatatom 99 162 5 0 0 1 to_client - - 0;
#X floatatom 390 165 3 0 0 1 socket - - 0;
#X symbolatom 422 140 15 0 0 1 ip - - 0;
#X floatatom 359 189 5 0 0 1 client - - 0;
#X floatatom 454 115 7 0 0 1 port - - 0;
#X floatatom 180 117 5 0 0 1 on_socket - - 0;
#X floatatom 139 141 5 0 0 1 sentsize[bytes] - - 0;
#X obj 99 62 route sent;
#X obj 359 61 route client;
#X floatatom 99 342 5 0 0 1 socket - -;
#X floatatom 180 297 5 0 0 1 outsize[bytes] - -;
#X floatatom 139 321 5 0 0 1 insize[bytes] - -;
#X floatatom 99 342 5 0 0 1 socket - - 0;
#X floatatom 180 297 5 0 0 1 outsize[bytes] - - 0;
#X floatatom 139 321 5 0 0 1 insize[bytes] - - 0;
#X obj 99 242 route bufsize;
#X floatatom 93 501 3 0 0 0 - - -;
#X floatatom 147 501 3 0 0 0 - - -;
#X floatatom 120 501 3 0 0 0 - - -;
#X floatatom 93 501 3 0 0 0 - - - 0;
#X floatatom 147 501 3 0 0 0 - - - 0;
#X floatatom 120 501 3 0 0 0 - - - 0;
#X obj 93 421 route address;
#X obj 99 271 unpack f f f;
#X obj 359 87 unpack f f s f;
#X obj 99 91 unpack f f f;
#X obj 93 450 unpack f f f f f;
#X floatatom 174 501 3 0 0 1 ip - -;
#X floatatom 202 475 6 0 0 1 port - -;
#X floatatom 174 501 3 0 0 1 ip - - 0;
#X floatatom 202 475 6 0 0 1 port - - 0;
#X text 361 261 info about current inqueue/outqueue;
#X obj 99 216 r \$0.tcpserver.o5;
#X obj 93 395 r \$0.tcpserver.o5;
#X obj 99 36 r \$0.tcpserver.o5;
#X obj 359 35 r \$0.tcpserver.o5;
#X text 354 435 NOTE: outlets #3 and #4 are for compatibility with
mrpeach's net obects. You can get all information via outlet #5 as
well;
#X text 354 435 NOTE: outlets #3 and #4 are for compatibility with mrpeach's net obects. You can get all information via outlet #5 as well;
#X obj 664 35 r \$0.tcpserver.o5;
#X obj 664 61 route type;
#X obj 664 86 symbol;
#X symbolatom 664 111 0 0 0 3 event-type - -;
#X symbolatom 664 111 0 0 0 3 event-type - - 0;
#X msg 104 556 bang;
#X obj 104 581 s \$0.tcpserver;
#X obj 495 483 r \$0.tcpserver.o5;
#X obj 495 509 route local_address port;
#X obj 495 534 route IPv4;
#X floatatom 495 589 3 0 0 0 - - -;
#X floatatom 522 589 3 0 0 0 - - -;
#X floatatom 549 589 3 0 0 0 - - -;
#X floatatom 576 589 3 0 0 0 - - -;
#X floatatom 495 589 3 0 0 0 - - - 0;
#X floatatom 522 589 3 0 0 0 - - - 0;
#X floatatom 549 589 3 0 0 0 - - - 0;
#X floatatom 576 589 3 0 0 0 - - - 0;
#X text 458 588 from;
#X obj 495 566 unpack f f f f f;
#X floatatom 604 589 6 0 0 0 - - -;
#X floatatom 664 549 6 0 0 1 port - -;
#X floatatom 604 589 6 0 0 0 - - - 0;
#X floatatom 664 549 6 0 0 1 port - - 0;
#X text 227 565 query info about the server;
#X obj 89 701 route type;
#X obj 90 729 list prepend;
#X obj 90 754 list trim;
#X obj 90 779 route connect disconnect send receive client server;
#X obj 89 676 r \$0.tcpserver.o5;
#X text 217 716 the 'type' message comes first \, so you can use it
to prefix the actual info-messages;
#X text 217 716 the 'type' message comes first \, so you can use it to prefix the actual info-messages;
#X connect 7 0 19 0;
#X connect 8 0 18 0;
#X connect 12 0 17 0;
Expand Down Expand Up @@ -195,18 +183,32 @@ to prefix the actual info-messages;
#X obj 707 384 tcpreceive;
#X obj 707 409 tcpclient;
#X obj 166 476 unpack f f f f f;
#X floatatom 275 499 6 0 0 0 - - -;
#X floatatom 275 499 6 0 0 0 - - - 0;
#X msg 141 159 port 10000;
#X text 223 158 reset port number;
#X msg 253 310 accept \$1;
#X obj 253 291 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 253 291 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X text 333 305 disable/enable accepting new connections;
#X msg 253 347 maxconnections 32;
#X text 385 349 set the maximum number of clients;
#X obj 15 345 r \$0.tcpserver;
#X text 319 224 where data is sent to;
#X text 602 580 copyright (c) 2010-2021 IOhannes m zmoelnig;
#N canvas 928 315 508 398 META 0;
#X text 12 5 KEYWORDS network;
#X text 12 25 LICENSE GPL-2.0-or-later;
#X text 12 95 DESCRIPTION listens on a port for bi-directional TCP/IP connections, f 67;
#X text 12 65 HELP_PATCH_AUTHORS Martin Peach \, Roman Haefeli \, IOhannes m zmölnig, f 66;
#X text 12 45 AUTHOR IOhannes m zmölnig;
#X text 12 255 OUTLET_1 number of open connections;
#X text 12 275 OUTLET_2 socket ID of the current connection;
#X text 12 295 OUTLET_3 IP address/port of the current remote client;
#X text 12 315 OUTLET_4 all the meta-information about the connections (and more) \, formatted as routeable messages, f 67;
#X text 12 235 OUTLET_0 list: serialized data received from clients;
#X text 12 135 INLET_0 broadcast ...: send the same data to all clients;
#X text 68 155 send <sock> ...: send data to the client connected via the socket ID <sock>, f 57;
#X text 68 187 client <cli> ...: send data to the client identified with the client-id <cli>;
#X restore 833 647 pd META;
#X connect 6 0 12 0;
#X connect 10 0 15 0;
#X connect 11 0 10 1;
Expand Down

0 comments on commit d199150

Please sign in to comment.