| 1387 | } |
| 1388 | |
| 1389 | void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) { |
| 1390 | int cport, cfd, max = MAX_ACCEPTS_PER_CALL; |
| 1391 | char cip[NET_IP_STR_LEN]; |
| 1392 | UNUSED(mask); |
| 1393 | UNUSED(privdata); |
| 1394 | UNUSED(el); |
| 1395 | |
| 1396 | while(max--) { |
| 1397 | cfd = anetTcpAccept(serverTL->neterr, fd, cip, sizeof(cip), &cport); |
| 1398 | if (cfd == ANET_ERR) { |
| 1399 | if (errno != EWOULDBLOCK) |
| 1400 | serverLog(LL_WARNING, |
| 1401 | "Accepting client connection: %s", serverTL->neterr); |
| 1402 | return; |
| 1403 | } |
| 1404 | anetCloexec(cfd); |
| 1405 | serverLog(LL_VERBOSE,"Accepted %s:%d", cip, cport); |
| 1406 | |
| 1407 | acceptOnThread(connCreateAcceptedSocket(cfd), 0, cip); |
| 1408 | } |
| 1409 | } |
| 1410 | |
| 1411 | void acceptTLSHandler(aeEventLoop *el, int fd, void *privdata, int mask) { |
| 1412 | int cport, cfd, max = MAX_ACCEPTS_PER_CALL_TLS; |
nothing calls this directly
no test coverage detected