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

Function acceptTLSHandler

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

Source from the content-addressed store, hash-verified

1142}
1143
1144void acceptTLSHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
1145 int cport, cfd, max = MAX_ACCEPTS_PER_CALL;
1146 char cip[NET_IP_STR_LEN];
1147 UNUSED(el);
1148 UNUSED(mask);
1149 UNUSED(privdata);
1150
1151 while(max--) {
1152 cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
1153 if (cfd == ANET_ERR) {
1154 if (errno != EWOULDBLOCK)
1155 serverLog(LL_WARNING,
1156 "Accepting client connection: %s", server.neterr);
1157 return;
1158 }
1159 anetCloexec(cfd);
1160 serverLog(LL_VERBOSE,"Accepted %s:%d", cip, cport);
1161 acceptCommonHandler(connCreateAcceptedTLS(cfd, server.tls_auth_clients),0,cip);
1162 }
1163}
1164
1165void acceptUnixHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
1166 int cfd, max = MAX_ACCEPTS_PER_CALL;

Callers

nothing calls this directly

Calls 4

anetTcpAcceptFunction · 0.85
anetCloexecFunction · 0.85
acceptCommonHandlerFunction · 0.85
connCreateAcceptedTLSFunction · 0.85

Tested by

no test coverage detected