Thanks HG. OK I think I have a pretty good grasp of the protocol now, but...
I am having a little difficulty undertsanding the use of standard I/O as a winboard communication channel. I am using Java because I want to learn java, it is not clear to me if the same issues apply to c++.
Anyways, below is a quote from the SUN documentation
http://java.sun.com/docs/books/tutorial ... io/cl.html
Standard Streams are a feature of many operating systems. By default, they read input from the keyboard and write output to the display. They also support I/O on files and between programs, but that feature is controlled by the command line interpreter, not the program.
The Java platform supports three Standard Streams: Standard Input, accessed through System.in; Standard Output, accessed through System.out; and Standard Error, accessed through System.err. These objects are defined automatically and do not need to be opened. Standard Output and Standard Error are both for output; having error output separately allows the user to divert regular output to a file and still be able to read error messages. For more information, refer to the documentation for your command line interpreter.
And now two quotes from Tim Mann's protocol document..
An xboard chess engine runs as a separate process from xboard itself, connected to xboard through a pair of anonymous pipes. The engine does not have to do anything special to set up these pipes. xboard sets up the pipes itself and starts the engine with one pipe as its standard input and the other as its standard output. The engine then reads commands from its standard input and writes responses to its standard output. This is, unfortunately, a little more complicated to do right than it sounds; see section 6 below.
A WinBoard chess engine is a Win32 console program that simply reads from its standard input and writes to its standard output.
Here is my problem...
If we define the standard output of the engine (or any program) as the channel by which the program sends information to the screen, And standard input as the channel by which winboard would accept any information from the keyboard (?) then
1. what is the mechanism by which the standard output of the engine is linked to the standard input of winboard.
2. Are we not diverting "system" streams, which would make the keyboard and screen unavailable for their normal purpose?
naturally since this is a two way communication, the same would apply for commands from winboard to engine.