2 * $Header: /cvsroot/pgpool/pgpool-II/pcp/pcp_stream.h,v 1.2 2008/01/29 01:56:38 y-asaba Exp $
4 * pgpool: a language independent connection pool server for PostgreSQL
5 * written by Tatsuo Ishii
7 * Copyright (c) 2003-2008 PgPool Global Development Group
9 * Permission to use, copy, modify, and distribute this software and
10 * its documentation for any purpose and without fee is hereby
11 * granted, provided that the above copyright notice appear in all
12 * copies and that both that copyright notice and this permission
13 * notice appear in supporting documentation, and that the name of the
14 * author not be used in advertising or publicity pertaining to
15 * distribution of the software without specific, written prior
16 * permission. The author makes no representations about the
17 * suitability of this software for any purpose. It is provided "as
18 * is" without express or implied warranty.
20 * pcp_stream.h - master header file.
28 #define READBUFSZ 1024
29 #define WRITEBUFSZ 8192
32 int fd; /* fd for connection */
34 char *wbuf; /* write buffer for the connection */
35 int wbufsz; /* write buffer size */
36 int wbufpo; /* buffer offset */
38 char *hp; /* pending data buffer head address */
39 int po; /* pending data offset */
40 int bufsz; /* pending data buffer size */
41 int len; /* pending data length */
44 extern PCP_CONNECTION *pcp_open(int fd);
45 extern void pcp_close(PCP_CONNECTION *pc);
46 extern int pcp_read(PCP_CONNECTION *pc, void *buf, int len);
47 extern int pcp_write(PCP_CONNECTION *pc, void *buf, int len);
48 extern int pcp_flush(PCP_CONNECTION *pc);
50 #define UNIX_DOMAIN_PATH "/tmp"
52 #endif /* PCP_STREAM_H */