* pqFlush: send any data waiting in the output buffer * * Return 0 on success, -1 on failure and 1 when not all data could be sent * because the socket would block and the connection is non-blocking. * (See pqSendSome comments about how failure should be handled.) */
| 1024 | * (See pqSendSome comments about how failure should be handled.) |
| 1025 | */ |
| 1026 | int |
| 1027 | pqFlush(PGconn *conn) |
| 1028 | { |
| 1029 | if (conn->outCount > 0) |
| 1030 | { |
| 1031 | if (conn->Pfdebug) |
| 1032 | fflush(conn->Pfdebug); |
| 1033 | |
| 1034 | return pqSendSome(conn, conn->outCount); |
| 1035 | } |
| 1036 | |
| 1037 | return 0; |
| 1038 | } |
| 1039 | |
| 1040 | /* |
| 1041 | * pqFlushNonBlocking: |
no test coverage detected