Home | History | Annotate | Download | only in server

Lines Matching full:sock

702   curl_socket_t sock;
820 sock = data[idx].fd;
821 fds = curlx_sktosi(sock);
829 FD_CLR(sock, writefds);
830 FD_CLR(sock, exceptfds);
834 FD_CLR(sock, readfds);
835 FD_CLR(sock, exceptfds);
844 FD_CLR(sock, readfds);
848 FD_CLR(sock, writefds);
861 FD_CLR(sock, exceptfds);
866 if(FD_ISSET(sock, readfds) || FD_ISSET(sock, writefds) ||
867 FD_ISSET(sock, exceptfds)) {
873 FD_CLR(sock, readfds);
874 FD_CLR(sock, writefds);
875 FD_CLR(sock, exceptfds);
1197 static curl_socket_t sockdaemon(curl_socket_t sock,
1213 rc = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
1226 sclose(sock);
1231 sclose(sock);
1256 rc = bind(sock, &listener.sa, sizeof(listener.sa4));
1264 rc = bind(sock, &listener.sa, sizeof(listener.sa6));
1271 sclose(sock);
1289 if(getsockname(sock, &localaddr.sa, &la_size) < 0) {
1293 sclose(sock);
1314 sclose(sock);
1322 return sock;
1326 rc = listen(sock, 5);
1330 sock, error, strerror(error));
1331 sclose(sock);
1335 return sock;
1342 curl_socket_t sock = CURL_SOCKET_BAD;
1467 sock = socket(AF_INET, SOCK_STREAM, 0);
1470 sock = socket(AF_INET6, SOCK_STREAM, 0);
1473 if(CURL_SOCKET_BAD == sock) {
1495 rc = connect(sock, &me.sa, sizeof(me.sa4));
1506 rc = connect(sock, &me.sa, sizeof(me.sa6));
1517 msgsock = sock; /* use this as stream */
1521 sock = sockdaemon(sock, &port);
1522 if(CURL_SOCKET_BAD == sock) {
1545 juggle_again = juggle(&msgsock, sock, &mode);
1550 if((msgsock != sock) && (msgsock != CURL_SOCKET_BAD))
1553 if(sock != CURL_SOCKET_BAD)
1554 sclose(sock);