MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / cdb2_socket_pool_get

Function cdb2_socket_pool_get

cdb2api/cdb2api.c:2076–2082  ·  view source on GitHub ↗

Get the file descriptor of a socket matching the given type string from * the pool. Returns -1 if none is available or the file descriptor on * success. */

Source from the content-addressed store, hash-verified

2074 * the pool. Returns -1 if none is available or the file descriptor on
2075 * success. */
2076int cdb2_socket_pool_get(const char *typestr, int dbnum, int *port)
2077{
2078 int rc = cdb2_socket_pool_get_ll(typestr, dbnum, port);
2079 if (log_calls)
2080 fprintf(stderr, "%s(%s,%d): fd=%d\n", __func__, typestr, dbnum, rc);
2081 return rc;
2082}
2083
2084void cdb2_socket_pool_donate_ext(const char *typestr, int fd, int ttl,
2085 int dbnum)

Callers 3

newsql_connectFunction · 0.85
comdb2db_get_dbhostsFunction · 0.85
cdb2_dbinfo_queryFunction · 0.85

Calls 1

cdb2_socket_pool_get_llFunction · 0.85

Tested by

no test coverage detected