MCPcopy Create free account
hub / github.com/apache/cloudberry / my_sock_read

Function my_sock_read

src/interfaces/libpq/fe-secure-openssl.c:1669–1697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1667static BIO_METHOD *my_bio_methods;
1668
1669static int
1670my_sock_read(BIO *h, char *buf, int size)
1671{
1672 int res;
1673
1674 res = pqsecure_raw_read((PGconn *) BIO_get_app_data(h), buf, size);
1675 BIO_clear_retry_flags(h);
1676 if (res < 0)
1677 {
1678 /* If we were interrupted, tell caller to retry */
1679 switch (SOCK_ERRNO)
1680 {
1681#ifdef EAGAIN
1682 case EAGAIN:
1683#endif
1684#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
1685 case EWOULDBLOCK:
1686#endif
1687 case EINTR:
1688 BIO_set_retry_read(h);
1689 break;
1690
1691 default:
1692 break;
1693 }
1694 }
1695
1696 return res;
1697}
1698
1699static int
1700my_sock_write(BIO *h, const char *buf, int size)

Callers

nothing calls this directly

Calls 1

pqsecure_raw_readFunction · 0.85

Tested by

no test coverage detected