MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lookupClientByID

Function lookupClientByID

app/redis-6.2.6/src/networking.c:1491–1495  ·  view source on GitHub ↗

Return a client by ID, or NULL if the client ID is not in the set * of registered clients. Note that "fake clients", created with -1 as FD, * are not registered clients. */

Source from the content-addressed store, hash-verified

1489 * of registered clients. Note that "fake clients", created with -1 as FD,
1490 * are not registered clients. */
1491client *lookupClientByID(uint64_t id) {
1492 id = htonu64(id);
1493 client *c = raxFind(server.clients_index,(unsigned char*)&id,sizeof(id));
1494 return (c == raxNotFound) ? NULL : c;
1495}
1496
1497/* Write data in output buffers to client. Return C_OK if the client
1498 * is still valid after the call, C_ERR if it was freed because of some

Callers 7

sendTrackingMessageFunction · 0.85
trackingInvalidateKeyRawFunction · 0.85
clientCommandFunction · 0.85
RM_GetClientUserNameByIdFunction · 0.85
RM_GetClientInfoByIdFunction · 0.85
RM_GetClientCertificateFunction · 0.85

Calls 1

raxFindFunction · 0.85

Tested by

no test coverage detected