/external/nanopb-c/examples/network_server/ |
server.c | 89 int listenfd, connfd; local 93 listenfd = socket(AF_INET, SOCK_STREAM, 0); 95 setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)); 101 if (bind(listenfd, (struct sockaddr*)&servaddr, sizeof(servaddr)) != 0) 107 if (listen(listenfd, 5) != 0) 115 connfd = accept(listenfd, NULL, NULL);
|
/external/mdnsresponder/mDNSShared/ |
dnssd_clientstub.c | 552 dnssd_sock_t listenfd = dnssd_InvalidSocket, errsd = dnssd_InvalidSocket; local 579 listenfd = socket(AF_DNSSD, SOCK_STREAM, 0); 580 if (!dnssd_SocketValid(listenfd)) deliver_request_bailout("TCP socket"); 585 if (bind(listenfd, (struct sockaddr*) &caddr, sizeof(caddr)) < 0) deliver_request_bailout("TCP bind"); 586 if (getsockname(listenfd, (struct sockaddr*) &caddr, &len) < 0) deliver_request_bailout("TCP getsockname"); 587 if (listen(listenfd, 1) < 0) deliver_request_bailout("TCP listen"); 597 listenfd = socket(AF_DNSSD, SOCK_STREAM, 0); 598 if (!dnssd_SocketValid(listenfd)) deliver_request_bailout("USE_NAMED_ERROR_RETURN_SOCKET socket"); 608 bindresult = bind(listenfd, (struct sockaddr *)&caddr, sizeof(caddr)); 611 if (listen(listenfd, 1) < 0) deliver_request_bailout("USE_NAMED_ERROR_RETURN_SOCKET listen") [all...] |
uds_daemon.c | 254 static dnssd_sock_t listenfd = dnssd_InvalidSocket; variable [all...] |
/external/fio/engines/ |
net.c | 26 int listenfd; member in struct:netio_data 674 f->fd = nd->listenfd; 683 if (poll_wait(td, nd->listenfd, POLLIN) < 0) 688 f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr, &socklen); 691 f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr6, &socklen); 992 nd->listenfd = fd; 1099 nd->listenfd = fd; 1119 if (listen(nd->listenfd, 10) < 0) { 1121 nd->listenfd = -1; 1181 if (nd->listenfd != -1 [all...] |