summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-int.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-11-30 03:08:19 +0000
committerBruce Momjian <bruce@momjian.us>1999-11-30 03:08:19 +0000
commit3ab5b1f1e661840c191dbba9d2985c17766896ef (patch)
tree1e6930a252733bbe82704c72303623e1f4199249 /src/interfaces/libpq/libpq-int.h
parentd264b53d2fce4029754554e4dd2014af5e4c55be (diff)
This patch (against the current CVS sources) adds to libpq the functions
PQconnectStart PQconnectPoll PQresetStart PQresetPoll PQsetenvStart PQsetenvPoll PQsetenvAbort and brings into the published interface PQsetenv. The first four are asynchronous analogues of PQconnectdb and PQreset - they allow an application to connect to the DB without blocking on remote I/O. The PQsetenv functions perform an environment negotiation with the server. Internal to libpq, pqReadReady and pqWriteReady have been made available across the library (they were previously static functions inside fe-misc.c). A lot of internal rearrangement has been necessary to support these changes. The API documentation has been updated also. Caveats: o The Windows code does not default to using non-blocking sockets, since I have no documentation: Define WIN32_NON_BLOCKING_CONNECTIONS to do that. o The SSL code still blocks. Ewan Mellor.
Diffstat (limited to 'src/interfaces/libpq/libpq-int.h')
-rw-r--r--src/interfaces/libpq/libpq-int.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index 7323e9fe065..64566d6c743 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-int.h,v 1.13 1999/11/11 00:10:14 momjian Exp $
+ * $Id: libpq-int.h,v 1.14 1999/11/30 03:08:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -168,6 +168,10 @@ struct pg_conn
/* Saved values of connection options */
char *pghost; /* the machine on which the server is
* running */
+ char *pghostaddr; /* the IPv4 address of the machine on
+ * which the server is running, in
+ * IPv4 numbers-and-dots notation. Takes
+ * precedence over above. */
char *pgport; /* the server's communication port */
char *pgtty; /* tty on which the backend messages is
* displayed (NOT ACTUALLY USED???) */
@@ -220,6 +224,9 @@ struct pg_conn
PGresult *result; /* result being constructed */
PGresAttValue *curTuple; /* tuple currently being read */
+ /* Handle for setenv request. Used during connection only. */
+ PGsetenvHandle setenv_handle;
+
#ifdef USE_SSL
SSL *ssl;
#endif
@@ -268,6 +275,8 @@ extern int pqPutInt(int value, size_t bytes, PGconn *conn);
extern int pqReadData(PGconn *conn);
extern int pqFlush(PGconn *conn);
extern int pqWait(int forRead, int forWrite, PGconn *conn);
+extern int pqReadReady(PGconn *conn);
+extern int pqWriteReady(PGconn *conn);
/* bits in a byte */
#define BYTELEN 8