Lines Matching refs:sock
870 static int send_doc(curl_socket_t sock, struct httprequest *req);
874 static int get_request(curl_socket_t sock, struct httprequest *req) in get_request() argument
884 send_doc(sock, req); in get_request()
895 got = sread(sock, reqbuf + req->offset, REQBUFSIZ - req->offset); in get_request()
911 FD_SET(sock, &input); in get_request()
914 rc = select((int)sock + 1, &input, &output, NULL, &timeout); in get_request()
946 got = sread(sock, reqbuf + req->offset, req->cl); in get_request()
948 got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset); in get_request()
1007 static int send_doc(curl_socket_t sock, struct httprequest *req) in send_doc() argument
1036 written = swrite(sock, STREAMTHIS, count); in send_doc()
1179 written = swrite(sock, buffer, num); in send_doc()
1840 static curl_socket_t accept_connection(curl_socket_t sock) in accept_connection() argument
1851 msgsock = accept(sock, NULL, NULL); in accept_connection()
1997 curl_socket_t sock = CURL_SOCKET_BAD; in main() local
2179 sock = socket(socket_domain, SOCK_STREAM, 0); in main()
2181 all_sockets[0] = sock; in main()
2184 if(CURL_SOCKET_BAD == sock) { in main()
2191 if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, in main()
2198 if(0 != curlx_nonblock(sock, TRUE)) { in main()
2211 rc = bind(sock, &me.sa, sizeof(me.sa4)); in main()
2219 rc = bind(sock, &me.sa, sizeof(me.sa6)); in main()
2224 rc = bind_unix_socket(sock, unix_socket, &me.sau); in main()
2254 if(getsockname(sock, &localaddr.sa, &la_size) < 0) { in main()
2258 sclose(sock); in main()
2279 sclose(sock); in main()
2292 rc = listen(sock, 50); in main()
2382 msgsock = accept_connection(sock); in main()
2384 " returned %" FMT_SOCKET_T, sock, msgsock); in main()
2402 rc = service_connection(all_sockets[socket_idx], req, sock, in main()
2462 if((all_sockets[socket_idx] != sock) && in main()
2466 if(sock != CURL_SOCKET_BAD) in main()
2467 sclose(sock); in main()