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

Function createClusterLink

app/redis-6.2.6/src/cluster.c:626–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624 * -------------------------------------------------------------------------- */
625
626clusterLink *createClusterLink(clusterNode *node) {
627 clusterLink *link = zmalloc(sizeof(*link));
628 link->ctime = mstime();
629 link->sndbuf = sdsempty();
630 link->rcvbuf = zmalloc(link->rcvbuf_alloc = RCVBUF_INIT_LEN);
631 link->rcvbuf_len = 0;
632 link->node = node;
633 link->conn = NULL;
634 return link;
635}
636
637/* Free a cluster link, but does not free the associated node of course.
638 * This function will just make sure that the original node associated

Callers 2

clusterConnAcceptHandlerFunction · 0.85
clusterCronFunction · 0.85

Calls 3

zmallocFunction · 0.85
sdsemptyFunction · 0.85
mstimeFunction · 0.70

Tested by

no test coverage detected