1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Libpq non-blocking mode, from Alfred Perlstein

This commit is contained in:
Bruce Momjian
2000-01-18 06:09:24 +00:00
parent b1e891dbd4
commit 10d7287ab9
6 changed files with 341 additions and 47 deletions

View File

@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-int.h,v 1.16 2000/01/15 05:37:21 ishii Exp $
* $Id: libpq-int.h,v 1.17 2000/01/18 06:09:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -214,6 +214,9 @@ struct pg_conn
int inEnd; /* offset to first position after avail
* data */
int nonblocking; /* whether this connection is using a blocking
* socket to the backend or not */
/* Buffer for data not yet sent to backend */
char *outBuffer; /* currently allocated buffer */
int outBufSize; /* allocated size of buffer */
@@ -300,4 +303,10 @@ extern char *sys_errlist[];
#endif /* sunos4 */
#endif /* !strerror */
/*
* this is so that we can check is a connection is non-blocking internally
* without the overhead of a function call
*/
#define pqIsnonblocking(conn) (conn->nonblocking)
#endif /* LIBPQ_INT_H */