src/libguac/protocol.c
/**
 * Loop through the provided NULL-terminated array, writing the values in the
 * array to the given socket. Values are written as a series of Guacamole
 * protocol elements, including the leading comma and the value length in
 * addition to the value itself. Returns zero on success, non-zero on error.
 *
 * @param socket
 *     The socket to which the data should be written.
 *
 * @param array
 *     The NULL-terminated array of values to write.
 *
 * @return
 *     Zero on success, non-zero on error.
 */
Loop through the provided NULL-terminated array, writing the values in the
array to the given socket. Values are written as a series of Guacamole
protocol elements, including the leading comma and the value length in
addition to the value itself. Returns zero on success, non-zero on error.

@param socket
The socket to which the data should be written.

@param array
The NULL-terminated array of values to write.

@return
Zero on success, non-zero on error.
Loop through the provided NULL - terminated array writing the values in the array to the given socket . Values are written as a series of Guacamole protocol elements including the leading comma and the value length in addition to the value itself . Returns zero on success non - zero on error . @param socket The socket to which the data should be written . @param array The NULL - terminated array of values to write . @return Zero on success non - zero on error .
static int guac_socket_write_array(guac_socket* socket, const char** array) {
    for (int i=0; array[i] != NULL; i++) {
        if (guac_socket_write_string(socket, ","))
            return -1;
        if (__guac_socket_write_length_string(socket, array[i]))
            return -1;
    }
    return 0;
}
static int guac_socket_write_array ( guac_socket * socket , const char * * array ) { for ( int i = 0 ; array [ i ] != NULL ; i ++ ) { if ( guac_socket_write_string ( socket , " " ) ) return -1 ; if ( __guac_socket_write_length_string ( socket , array [ i ] ) ) return -1 ; } return 0 ; }
Loop through the provided NULL-terminated array, writing the values in the
 array to the given socket.
Loop through the provided NULL - terminated array writing the values in the array to the given socket .
/* Loop through array, writing provided values to the socket. */