Skip to content
Diomidis Spinellis edited this page May 31, 2016 · 3 revisions

Sgsh negotiation API for compatible programs

/* Each tool in the sgsh graph calls sgsh_negotiate() to take part in
 * peer-to-peer negotiation.
 * The function's return value signifies success (0) or failure (1) of the
 * negotiation phase.
 */
 int sgsh_negotiate(const char *tool_name, /* Input. */
                    int channels_required, /* How many input fds the process can read from.*/
                    int channels_provided, /* How many output fds the process can write to. */
                                     /* Return values. */
                    int **input_fds,  /* Input file descriptors. */
                    int *n_input_fds, /* Number of input file descriptors. */
                    int **output_fds, /* Output file descriptors. */
                    int *n_output_fds); /* Number of output file descriptors. */

Clone this wiki locally