aboutsummaryrefslogtreecommitdiff
path: root/doc/tutorials/networking/04.netserver_and_netclient.pd
blob: 92d431a01f5a603aba4184ef8e071921e9f88c12 (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
#N canvas 10 40 620 460 10;
#X declare -lib libdir;
#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 obj 338 419 print client2;
#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 62 144 broadcast hello kuva!;
#X text 99 244 data;
#X text 133 225 connections;
#X text 164 163 IP address;
#X obj 125 419 print client1;
#X text 302 162 netserver connects;
#X text 301 174 different clients over;
#X text 301 188 a network \, broadcasting;
#X text 301 200 stream of information;
#X text 300 211 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 connect 7 0 25 0;
#X connect 7 1 9 0;
#X connect 8 0 7 0;
#X connect 10 0 7 0;
#X connect 11 0 15 0;
#X connect 11 1 13 0;
#X connect 12 0 11 0;
#X connect 14 0 11 0;
#X connect 16 0 10 0;
#X connect 17 0 14 0;
#X connect 18 0 2 0;
#X connect 18 1 3 0;
#X connect 18 2 5 0;
#X connect 18 3 4 0;
#X connect 19 0 7 0;
#X connect 20 0 11 0;
#X connect 21 0 18 0;