aboutsummaryrefslogtreecommitdiff
path: root/doc/tutorials/networking/04.netserver_and_netclient.pd
blob: 03729524a4b06d266eaec1c11a03600312b04983 (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
#N canvas 46 48 620 460 10;
#X declare -lib maxlib;
#X obj 463 52 import maxlib;
#X obj 8 10 cnv 15 400 40 empty empty netserver_and_netclient 20 12
0 24 -228992 -66577 0;
#X floatatom 61 243 5 0 0 0 - - -;
#X floatatom 91 224 5 0 0 0 - - -;
#X symbolatom 165 178 10 0 0 0 - - -;
#X floatatom 122 201 5 0 0 0 - - -;
#X text 160 203 socket number;
#X obj 125 375 netclient;
#X msg 164 344 disconnect;
#X floatatom 184 397 5 0 0 0 - - -;
#X msg 141 296 send \$1;
#X obj 338 373 netclient;
#X msg 355 343 disconnect;
#X floatatom 395 394 5 0 0 0 - - -;
#X msg 338 303 send \$1;
#X floatatom 140 278 5 0 0 0 - - -;
#X floatatom 337 285 5 0 0 0 - - -;
#X obj 61 177 netserver 3001;
#X msg 124 323 connect localhost 3001;
#X msg 307 324 connect localhost 3001;
#X msg 21 136 broadcast hello kuva!;
#X text 99 244 data;
#X text 133 225 connections;
#X text 164 163 IP address;
#X text 343 177 netserver connects;
#X text 342 189 different clients over;
#X text 342 203 a network \, broadcasting;
#X text 342 215 stream of information;
#X text 341 226 through a server;
#X text 13 71 [netserver] and [netclient] gives you a bi-directional
connection so you can send data back and forth thru it. Also \, [netserver]
helps you manage multiple connections.;
#X obj 125 419 pddp/print;
#X obj 338 419 pddp/print;
#X msg 161 136 broadcast goodbye avuk!;
#X text 312 136 <-- click to send to all connected netclients;
#X connect 7 0 30 0;
#X connect 7 1 9 0;
#X connect 8 0 7 0;
#X connect 10 0 7 0;
#X connect 11 0 31 0;
#X connect 11 1 13 0;
#X connect 12 0 11 0;
#X connect 14 0 11 0;
#X connect 15 0 10 0;
#X connect 16 0 14 0;
#X connect 17 0 2 0;
#X connect 17 1 3 0;
#X connect 17 2 5 0;
#X connect 17 3 4 0;
#X connect 18 0 7 0;
#X connect 19 0 11 0;
#X connect 20 0 17 0;
#X connect 32 0 17 0;