diff options
-rw-r--r-- | doc/tutorials/networking/01.network_ports.pd | 24 | ||||
-rw-r--r-- | doc/tutorials/networking/02.netsend_netreceive.pd (renamed from doc/tutorials/networking/Attic/01.netsend_netreceive.pd) | 0 | ||||
-rw-r--r-- | doc/tutorials/networking/03.tcp_and_udp.pd (renamed from doc/tutorials/networking/Attic/02.tcp_and_udp.pd) | 16 | ||||
-rw-r--r-- | doc/tutorials/networking/04.netserver_and_netclient.pd | 52 | ||||
-rw-r--r-- | doc/tutorials/networking/05.OSC.pd | 43 | ||||
-rw-r--r-- | doc/tutorials/networking/TODO | 19 |
6 files changed, 146 insertions, 8 deletions
diff --git a/doc/tutorials/networking/01.network_ports.pd b/doc/tutorials/networking/01.network_ports.pd new file mode 100644 index 00000000..e430efa5 --- /dev/null +++ b/doc/tutorials/networking/01.network_ports.pd @@ -0,0 +1,24 @@ +#N canvas 16 37 648 468 10; +#X obj 8 10 cnv 15 400 40 empty empty network_ports 20 12 0 24 -228992 +-66577 0; +#X obj 49 418 pddp/pddplink http://en.wikipedia.org/wiki/TCP_and_UDP_port +; +#X text 10 63 In computer speak \, a "port" is an interface thru which +data is sent and received. Network ports are numbered \, and can be +1-65535. Network services are usually registered to use a specific +network port. HTTP uses port 80 \, sending email uses port 25 \, IMAP +uses port 143; +#X text 10 140 Before using a network port for your application \, +you should check to make sure that it isn't already used. You can see +a list of registered ports in a file called "services". On UNIX-based +systems \, its located in /etc/services. On Windows \, its located +in C:/WINDOWS/system32/drivers/etc/services; +#X text 10 231 On UNIX-based systems \, ports 0-1024 can only be used +by the administrator account "root". Windows does not have this restriction. +Most of the ports below 1024 are claimed anyway \, so its best to use +port numbers higher than 1024; +#X text 9 331 root-only; +#X text 101 330 often used; +#X text 255 330 mostly available; +#X text 6 348 0.......1024............10000..........................65535 +; diff --git a/doc/tutorials/networking/Attic/01.netsend_netreceive.pd b/doc/tutorials/networking/02.netsend_netreceive.pd index 2cdb37e8..2cdb37e8 100644 --- a/doc/tutorials/networking/Attic/01.netsend_netreceive.pd +++ b/doc/tutorials/networking/02.netsend_netreceive.pd diff --git a/doc/tutorials/networking/Attic/02.tcp_and_udp.pd b/doc/tutorials/networking/03.tcp_and_udp.pd index 514cf849..b301525f 100644 --- a/doc/tutorials/networking/Attic/02.tcp_and_udp.pd +++ b/doc/tutorials/networking/03.tcp_and_udp.pd @@ -1,4 +1,4 @@ -#N canvas 185 93 644 464 10; +#N canvas 185 93 648 468 10; #X obj 511 62 import maxlib; #X obj 10 10 cnv 15 400 40 empty empty tcp_and_udp 20 12 0 24 -228992 -66577 0; @@ -13,19 +13,19 @@ data \, its guaranteed to arrive.; #X obj 54 223 netsend; #X obj 266 224 netclient; #X obj 359 224 netserver; -#X text 178 295 UDP stands for User Datagram Protocol. It is a lightweight +#X text 178 285 UDP stands for User Datagram Protocol. It is a lightweight \, simple protocol that is meant to be as quick and small as possible. The downside is that the data packets are not guaranteed to arrive. ; #X obj 35 180 pddp/pddplink http://en.wikipedia.org/wiki/Transmission_Control_Protocol ; -#X obj 177 355 pddp/pddplink http://en.wikipedia.org/wiki/User_Datagram_Protocol +#X obj 177 345 pddp/pddplink http://en.wikipedia.org/wiki/User_Datagram_Protocol ; #X obj 132 224 netreceive 32194; -#X obj 265 386 netreceive 32194 1; -#X obj 187 386 netsend 1; -#X obj 407 386 sendOSC; -#X obj 478 386 dumpOSC 32192; -#X text 180 409 One advantage to UDP is that you do not need to maintain +#X obj 265 376 netreceive 32194 1; +#X obj 187 376 netsend 1; +#X obj 407 376 sendOSC; +#X obj 478 376 dumpOSC 32192; +#X text 180 399 One advantage to UDP is that you do not need to maintain a connection to receive data. Whenever you open a UDP port \, you will start receiving data.; diff --git a/doc/tutorials/networking/04.netserver_and_netclient.pd b/doc/tutorials/networking/04.netserver_and_netclient.pd new file mode 100644 index 00000000..ed64101a --- /dev/null +++ b/doc/tutorials/networking/04.netserver_and_netclient.pd @@ -0,0 +1,52 @@ +#N canvas 15 58 644 464 10; +#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 6 0 24 0; +#X connect 6 1 8 0; +#X connect 7 0 6 0; +#X connect 9 0 6 0; +#X connect 10 0 14 0; +#X connect 10 1 12 0; +#X connect 11 0 10 0; +#X connect 13 0 10 0; +#X connect 15 0 9 0; +#X connect 16 0 13 0; +#X connect 17 0 1 0; +#X connect 17 1 2 0; +#X connect 17 2 4 0; +#X connect 17 3 3 0; +#X connect 18 0 6 0; +#X connect 19 0 10 0; +#X connect 20 0 17 0; diff --git a/doc/tutorials/networking/05.OSC.pd b/doc/tutorials/networking/05.OSC.pd new file mode 100644 index 00000000..77ab8e07 --- /dev/null +++ b/doc/tutorials/networking/05.OSC.pd @@ -0,0 +1,43 @@ +#N canvas 115 56 644 464 10; +#X obj 8 10 cnv 15 400 40 empty empty OSC 20 12 0 24 -228992 -66577 +0; +#X obj 80 298 sendOSC; +#X floatatom 79 323 5 0 0 0 - - -; +#X msg 113 271 disconnect; +#X floatatom 123 322 5 0 0 0 - - -; +#X msg 21 164 send /kuva \$1; +#X floatatom 22 149 5 0 0 0 - - -; +#X floatatom 122 148 5 0 0 0 - - -; +#X floatatom 342 295 5 0 0 0 - - -; +#X obj 338 312 print kuva; +#X msg 122 164 send /space \$1; +#X obj 340 231 dumpOSC 30200; +#X msg 109 249 connect localhost 30200; +#X floatatom 231 147 5 0 0 0 - - -; +#X msg 231 163 send /asdf \$1; +#X obj 339 259 OSCroute /kuva /space; +#X obj 414 312 print space; +#X obj 498 312 print other; +#X floatatom 421 295 5 0 0 0 - - -; +#X text 10 65 OSC is a protocol for sharing data across networks and +applications. OSC stands for Open Sound Control. It was originally +designed to replace MIDI \, but it has caught on instead for inter-application +communication.; +#X text 21 361 On the most basic level \, it works very similarly to +[netsend] and [netreceive].; +#X connect 1 0 2 0; +#X connect 1 1 4 0; +#X connect 3 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 5 0; +#X connect 7 0 10 0; +#X connect 10 0 1 0; +#X connect 11 0 15 0; +#X connect 12 0 1 0; +#X connect 13 0 14 0; +#X connect 14 0 1 0; +#X connect 15 0 8 0; +#X connect 15 0 9 0; +#X connect 15 1 16 0; +#X connect 15 1 18 0; +#X connect 15 2 17 0; diff --git a/doc/tutorials/networking/TODO b/doc/tutorials/networking/TODO new file mode 100644 index 00000000..77fa7752 --- /dev/null +++ b/doc/tutorials/networking/TODO @@ -0,0 +1,19 @@ + + + + + +Topics to Add +------------- + +- netsend/netreceive +- tcp and udp +- netclient/netserver + +- chat client/server exercise + +- OSC + +- running Pd as a daemon + +- netpd |