When data needs to pass from one computer to another, sockets can be used (see 2.5.3 to understand the usefulness of having more than one computer). Various programs were developed to facilitate this process. The program socket_out is used to redirect the standard input to a port on the same computer or on another computer on the net and the program socket_in is creating a port on the local computer waiting for data. Some of the modules directly act as client/server (example log.tcl or tcr.tcl). Data can be passed to them using sockets.
Point picking
computer_a% log.tcl 9100 &
computer_b% pixelpos image.png | tee points.log | socket_out computer_a 9100
computer_b is used to pick points on image.png and send the data to a logging window on computer_a. A local copy of the points is kept on computer_b in the file points.log.
Point measurement
computer_a% tcr.tcl computer_b 9000
computer_b% screen.tcl 9001 &
computer_b% socket_in 9000 | tee points.log | socket_out localhost 9001
Points are measured using a total station linked to computer_a. The data is sent to computer_b where a copy of the data is saved in geometry.log and sent to a screen server for visualisation.
In some circumstances, it can be useful to send data to more than one destination. socket_fork.tcl was developed for that purpose.