Lines Matching refs:sock
925 static int get_request(curl_socket_t sock, struct httprequest *req)
962 got = sread(sock, reqbuf + req->offset, req->cl);
964 got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset);
1028 static int send_doc(curl_socket_t sock, struct httprequest *req)
1054 written = swrite(sock, STREAMTHIS, count);
1197 written = swrite(sock, buffer, num);
1795 static curl_socket_t accept_connection(curl_socket_t sock)
1806 msgsock = accept(sock, NULL, NULL);
1947 curl_socket_t sock = CURL_SOCKET_BAD;
2090 sock = socket(socket_domain, SOCK_STREAM, 0);
2092 all_sockets[0] = sock;
2095 if(CURL_SOCKET_BAD == sock) {
2103 if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
2110 if(0 != curlx_nonblock(sock, TRUE)) {
2123 rc = bind(sock, &me.sa, sizeof(me.sa4));
2131 rc = bind(sock, &me.sa, sizeof(me.sa6));
2139 rc = bind(sock, &me.sa, sizeof(me.sau));
2180 rc = bind(sock, &me.sa, sizeof(me.sau));
2196 rc = listen(sock, 5);
2280 msgsock = accept_connection(sock);
2281 logmsg("accept_connection %d returned %d", sock, msgsock);
2295 rc = service_connection(all_sockets[socket_idx], &req, sock,
2342 if((all_sockets[socket_idx] != sock) &&
2346 if(sock != CURL_SOCKET_BAD)
2347 sclose(sock);