started by Theo Verelst
To make use a pipe or as here a general socket [L1 ] [L2 ] to connect a user interface with a progam or to link programs together is a long used and tried solution since at least X windows. Not that that always worked perfectly, but its pretty ok.
Also web servers/browsers, ftp, etc are examples of existing progams making use of socket IPC. The principle is clear enough: one makes a stream connection, and sends messages across with commands and data [L3 ].
In practice, this doesn't work out all too easy, usually. This page presents an example to do most work completely automatically to make a tcl program connect with a C program, and have the C program execute functions under control of the tcl program (alternatively: C compiled image processing on an interactive Bwise canvas).
Also, an example is easily created, where Tk is used to have a stack of buttons for testing this.
On this page I used a recent windows XP running KDE (on an X simulator), and my own compiled tcl/tk 8.4 (but like on linux) in kde windows. Also, I used the cygwin unix-like environment including gcc compiler for windows. Most or all of the materials presented here should run equally well on linux/unix, and probably other os-es, provided they have a C compiler with unix flavour sockets.
Major issues when making a socket link and programming code around it are:
The approach taken for this test version consists of the following steps:
Motivations and subsequent work include: