May 2017
Beginner
552 pages
28h 47m
English
Copying files with nc works because ns echoes the input from the input of one socket to the output at the other.
The broadcasting server is a bit more complicated. The while [ 1 ] loop will run forever. Within the loop, the script sleeps for 10 seconds, then invokes the date command and pipes the output to the nc command.
You can use nc to create a client, as follows:
$ nc 127.0.0.1 12345