Home
last modified time | relevance | path

Searched refs:listenfd (Results 1 – 8 of 8) sorted by relevance

/external/grpc-grpc/third_party/nanopb/examples/network_server/
Dserver.c113 int listenfd, connfd; in main() local
118 listenfd = socket(AF_INET, SOCK_STREAM, 0); in main()
119 setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)); in main()
125 if (bind(listenfd, (struct sockaddr*)&servaddr, sizeof(servaddr)) != 0) in main()
131 if (listen(listenfd, 5) != 0) in main()
140 connfd = accept(listenfd, NULL, NULL); in main()
/external/nanopb-c/examples/network_server/
Dserver.c117 int listenfd, connfd; in main() local
122 listenfd = socket(AF_INET, SOCK_STREAM, 0); in main()
123 setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)); in main()
129 if (bind(listenfd, (struct sockaddr*)&servaddr, sizeof(servaddr)) != 0) in main()
135 if (listen(listenfd, 5) != 0) in main()
144 connfd = accept(listenfd, NULL, NULL); in main()
/external/linux-kselftest/tools/testing/selftests/net/
Dreuseaddr_conflict.c88 int listenfd; in main() local
92 listenfd = open_port(0, 0); in main()
93 if (listenfd < 0) in main()
/external/mdnsresponder/mDNSShared/
Ddnssd_clientstub.c560 dnssd_sock_t listenfd = dnssd_InvalidSocket, errsd = dnssd_InvalidSocket; in deliver_request() local
587 listenfd = socket(AF_DNSSD, SOCK_STREAM, 0); in deliver_request()
588 if (!dnssd_SocketValid(listenfd)) deliver_request_bailout("TCP socket"); in deliver_request()
593 …if (bind(listenfd, (struct sockaddr*) &caddr, sizeof(caddr)) < 0) deliver_request_bailout("TCP bin… in deliver_request()
594 …if (getsockname(listenfd, (struct sockaddr*) &caddr, &len) < 0) deliver_request_bailout("TCP get… in deliver_request()
595 …if (listen(listenfd, 1) < 0) deliver_request_bailout("TCP lis… in deliver_request()
605 listenfd = socket(AF_DNSSD, SOCK_STREAM, 0); in deliver_request()
606 … if (!dnssd_SocketValid(listenfd)) deliver_request_bailout("USE_NAMED_ERROR_RETURN_SOCKET socket"); in deliver_request()
616 bindresult = bind(listenfd, (struct sockaddr *)&caddr, sizeof(caddr)); in deliver_request()
619 if (listen(listenfd, 1) < 0) deliver_request_bailout("USE_NAMED_ERROR_RETURN_SOCKET listen"); in deliver_request()
[all …]
Duds_daemon.c254 static dnssd_sock_t listenfd = dnssd_InvalidSocket; variable
4001 listenfd = socket(AF_DNSSD, SOCK_STREAM, 0); in udsserver_init()
4002 if (!dnssd_SocketValid(listenfd)) in udsserver_init()
4015 ret = bind(listenfd, (struct sockaddr *) &laddr, sizeof(laddr)); in udsserver_init()
4038 ret = bind(listenfd, (struct sockaddr *) &laddr, sizeof(laddr)); in udsserver_init()
4048 if (!uds_socket_setup(listenfd)) goto error; in udsserver_init()
4110 if (dnssd_SocketValid(listenfd)) in udsserver_exit()
4112 dnssd_close(listenfd); in udsserver_exit()
/external/curl/tests/server/
Dmqttd.c649 static bool incoming(curl_socket_t listenfd) in incoming() argument
672 curl_socket_t sockfd = listenfd; in incoming()
Dsocksd.c630 static bool incoming(curl_socket_t listenfd) in incoming() argument
656 curl_socket_t sockfd = listenfd; in incoming()
Dsockfilt.c902 curl_socket_t listenfd, in juggle() argument
947 sockfd = listenfd; in juggle()