printf("recognized flags:\n");
printf(" -h, --help show this message\n");
printf(" --expected-scope SCOPE fail if received scopes do not match SCOPE\n");
printf(" --expected-uri URI fail if received configuration link does not match URI\n");
printf(" --misbehave=MODE have the hook fail required postconditions\n" " (MODEs: no-hook, fail-async, no-token, no-socket)\n");
printf(" --no-hook don't install OAuth hooks\n");
printf(" --hang-forever don't ever return a token (combine with connect_timeout)\n");
printf(" --token TOKEN use the provided TOKEN value\n");
printf(" --stress-async busy-loop on PQconnectPoll rather than polling\n");
}
/* Set up our OAuth hooks. */
PQsetAuthDataHook(handle_auth_data);
/* Connect. (All the actual work is in the hook.) */ if (stress_async)
{ /* *Performanasynchronousconnection,busy-loopingonPQconnectPoll() *withoutactuallywaitingonsocketevents.Thisstressescodepaths *thatrelyonasynchronousworktobedonebeforecontinuingwith *thenextstepintheflow.
*/
PostgresPollingStatusType res;
conn = PQconnectStart(conninfo);
do
{
res = PQconnectPoll(conn);
} while (res != PGRES_POLLING_FAILED && res != PGRES_POLLING_OK);
} else
{ /* Perform a standard synchronous connection. */
conn = PQconnectdb(conninfo);
}
if (PQstatus(conn) != CONNECTION_OK)
{
fprintf(stderr, "connection to database failed: %s\n",
PQerrorMessage(conn));
PQfinish(conn); return1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.