blob: 097b785f1914f0cdb12f1b9df11a9b2b2c308b50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
#N canvas 1 53 1284 779 12;
#X msg 39 -10 print;
#X floatatom 344 316 5 0 0 0 - - -;
#X floatatom 368 366 5 0 0 0 - - -;
#X obj 392 317 unpack 0 0 0 0;
#X floatatom 392 340 3 0 0 0 - - -;
#X floatatom 423 340 3 0 0 0 - - -;
#X floatatom 455 340 3 0 0 0 - - -;
#X floatatom 489 340 3 0 0 0 - - -;
#X text 349 339 from;
#X text 260 316 connections;
#X obj 321 441 print received;
#X msg 135 86 client 1 1 2 3;
#X msg 63 14 broadcast 1 2 3;
#X text 91 -9 list of connections;
#X text 186 14 send to all clients;
#X text 298 366 on socket;
#X msg -11 -60 send 504 1 2 3;
#X text 100 -65 send to client on socket 504;
#X msg 647 -209 client 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18 19;
#X msg 647 -186 client 1 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39;
#X msg 647 -148 client 1 40 41 42 43 44 45 46 47 48 49 50 51 52 53
54 55 56 57 58 59;
#X msg 647 -110 client 1 60 61 62 63 64 65 66 67 68 69 70 71 72 73
74 75 76 77 78 79;
#X msg 647 -72 client 1 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
95 96 97 98 99;
#X msg 647 -34 client 1 100 101 102 103 104 105 106 107 108 109 110
111 112 113 114 115 116 117 118 119;
#X msg 647 4 client 1 120 121 122 123 124 125 126 127 138 139 140 141
142 143 144 145 146 147 148 149;
#X msg 647 42 client 1 150 151 152 153 154 155 156 157 158 159 160
161 162 163 164 165 166 167 168 169;
#X msg 647 80 client 1 170 171 172 173 174 175 176 177 178 179 180
181 182 183 184 185 186 187 188 189;
#X msg 647 118 client 1 190 191 192 193 194 195 196 197 198 199 200
201 202 203 204 205 206 207 208 209;
#X msg 647 156 client 1 210 211 212 213 214 215 216 217 218 219 220
221 222 223 224 225 226 227 228 229;
#X msg 647 194 client 1 230 231 232 233 234 235 236 237 238 239 240
241 242 243 244 245 246 247 248 249;
#X msg 647 232 client 1 250 251 252 253 254 255;
#X obj 40 -177 openpanel;
#X obj 40 -196 bng 15 250 50 0 empty empty choose_a_file 17 7 0 10
-24198 -241291 -1;
#X text 24 -157 ...any file;
#X msg -108 -157 client 1 \$1;
#X msg 14 -35 10 1 2 43;
#X text 98 -48 'send' prefix is optional;
#X text 88 -31 (the first number is socket number);
#X msg -41 -90 disconnectsocket \$1;
#X msg -84 -133 disconnectclient \$1;
#X obj 647 257 s toserver;
#X obj 321 264 r toserver;
#X floatatom 143 -172 5 0 0 0 - - -;
#X obj 121 -153 f;
#X obj 121 -172 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699
-241291 -1;
#X floatatom 185 -129 5 0 0 0 - - -;
#X obj 163 -110 f;
#X obj 163 -129 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699
-241291 -1;
#X text -109 -110 disconnect by socket or client number;
#X text 428 291 argument is port number;
#X text -8 293 Received messages are output as lists of bytes;
#X text -69 397 ***WARNING*** Attempting to print long messages can
hang pd!;
#X obj 321 419 spigot;
#X obj 360 399 tgl 15 0 empty empty enable_print 17 7 0 10 -24198 -258699
-45076 0 1;
#X msg 159 110 dump \$1;
#X obj -17 95 tgl 15 0 empty empty enable_dump 17 7 0 10 -4034 -257985
-1 0 1;
#X text -85 45 dump received;
#X text -85 61 characters to main;
#X text -85 76 window in hexdump;
#X text -85 92 format:;
#X obj 321 292 tcpserver 9997;
#X msg -132 -181 client 1 test.txt;
#X text 647 -234 [tcpserver] sends and receives bytes on [0...255]
;
#X text 158 -217 [tcpserver] waits for clients to connect to its port.
;
#X text -137 -202 send a file to client 1;
#X msg 183 134 client 1 72 101 108 108 111 13 10;
#X floatatom 578 377 9 0 0 0 - - -;
#X obj 710 336 print status;
#X floatatom 538 400 5 0 0 0 - - -;
#X text 468 399 to_client;
#X msg 111 62 client;
#X msg 88 39 client 1;
#X text 156 38 get state of client 1;
#X text 249 86 send (binary) 1 2 3 to client 1;
#X floatatom 712 469 5 0 0 0 - - -;
#X symbolatom 744 442 20 0 0 0 - - -;
#X floatatom 681 442 5 0 0 0 - - -;
#X text 645 376 bytes;
#X text 538 376 sent;
#X msg 209 160 clientbuf 1 65536;
#X obj 681 418 unpack 0 0 s 0;
#X floatatom 776 490 7 0 0 0 - - -;
#X text 621 490 length of send buffer:;
#X text 661 468 socket:;
#X text 630 441 client:;
#X text 721 441 ip:;
#X text 339 159 set send-buffer size for client 1;
#X text 163 62 get state of all clients (list on right outlet);
#X obj 538 351 unpack 0 0 0;
#X floatatom 619 418 5 0 0 0 - - -;
#X text 549 417 on_socket;
#X msg 233 184 send;
#X msg 258 209 1156;
#X text 276 183 output 'client' message for all sockets;
#X text 298 209 output 'client' message for socket 1156;
#X msg 283 234 unblock;
#X obj 538 312 route sent client blocked;
#X text -143 233 If sending too many messages blocks the system \,
tcpserver will stop sending until it receives an unblock message;
#X obj 652 359 print blocked;
#X text -69 476 2010/03/27 Martin Peach;
#N canvas 529 82 494 344 META 0;
#X text 12 225 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan
Wilkes for Pd version 0.42.;
#X text 12 205 AUTHOR Martin Peach;
#X text 12 25 LICENSE GPL v2 or later;
#X text 12 5 KEYWORDS control network;
#X text 12 45 DESCRIPTION wait for clients to connect to its port;
#X text 12 65 INLET_0 float list client disconnectclient disconnectsocket
send print broadcast dump clientbuf unblock;
#X text 12 105 OUTLET_0 anything;
#X text 12 125 OUTLET_1 float;
#X text 12 145 OUTLET_2 float;
#X text 12 165 OUTLET_3 list;
#X text 12 185 OUTLET_4 sent client blocked;
#X restore 839 398 pd META;
#X connect 0 0 60 0;
#X connect 3 0 4 0;
#X connect 3 1 5 0;
#X connect 3 2 6 0;
#X connect 3 3 7 0;
#X connect 11 0 60 0;
#X connect 12 0 60 0;
#X connect 16 0 60 0;
#X connect 18 0 40 0;
#X connect 19 0 40 0;
#X connect 20 0 40 0;
#X connect 21 0 40 0;
#X connect 22 0 40 0;
#X connect 23 0 40 0;
#X connect 24 0 40 0;
#X connect 25 0 40 0;
#X connect 26 0 40 0;
#X connect 27 0 40 0;
#X connect 28 0 40 0;
#X connect 29 0 40 0;
#X connect 30 0 40 0;
#X connect 31 0 34 0;
#X connect 32 0 31 0;
#X connect 34 0 60 0;
#X connect 35 0 60 0;
#X connect 38 0 60 0;
#X connect 39 0 60 0;
#X connect 41 0 60 0;
#X connect 42 0 43 1;
#X connect 43 0 39 0;
#X connect 44 0 43 0;
#X connect 45 0 46 1;
#X connect 46 0 38 0;
#X connect 47 0 46 0;
#X connect 52 0 10 0;
#X connect 53 0 52 1;
#X connect 54 0 60 0;
#X connect 55 0 54 0;
#X connect 60 0 52 0;
#X connect 60 1 1 0;
#X connect 60 2 2 0;
#X connect 60 3 3 0;
#X connect 60 4 96 0;
#X connect 61 0 60 0;
#X connect 65 0 60 0;
#X connect 70 0 60 0;
#X connect 71 0 60 0;
#X connect 79 0 60 0;
#X connect 80 0 76 0;
#X connect 80 1 74 0;
#X connect 80 2 75 0;
#X connect 80 3 81 0;
#X connect 88 0 68 0;
#X connect 88 1 66 0;
#X connect 88 2 89 0;
#X connect 91 0 60 0;
#X connect 92 0 60 0;
#X connect 95 0 60 0;
#X connect 96 0 88 0;
#X connect 96 1 80 0;
#X connect 96 2 98 0;
#X connect 96 3 67 0;
|