* pqFlushNonBlocking: * * wrapper for pqFlush, used by the dispatcher. * conn will be temporarily set to non-blocking mode, * so that if not all data could be sent on 1st attempt, * pqFlushNonBlocking will return 1 instead of waiting/retrying. * * Return 0 on success, -1 on failure and 1 when not all data could be sent */
| 1048 | * Return 0 on success, -1 on failure and 1 when not all data could be sent |
| 1049 | */ |
| 1050 | int |
| 1051 | pqFlushNonBlocking(PGconn *conn) |
| 1052 | { |
| 1053 | int ret; |
| 1054 | bool old = conn->nonblocking; |
| 1055 | conn->nonblocking = true; |
| 1056 | ret = pqFlush(conn); |
| 1057 | conn->nonblocking = old; |
| 1058 | return ret; |
| 1059 | } |
| 1060 | |
| 1061 | /* |
| 1062 | * pqWait: wait until we can read or write the connection socket |
no test coverage detected