Lines Matching refs:sock
653 static int get_request(curl_socket_t sock, struct httprequest *req) in get_request() argument
703 got = sread(sock, reqbuf + req->offset, req->cl); in get_request()
705 got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset); in get_request()
764 static int send_doc(curl_socket_t sock, struct httprequest *req) in send_doc() argument
794 written = swrite(sock, STREAMTHIS, count); in send_doc()
941 written = swrite(sock, buffer, num); in send_doc()
966 written = swrite(sock, req->rtp_buffer + (req->rtp_buffersize - count), in send_doc()
1054 curl_socket_t sock = CURL_SOCKET_BAD; in main() local
1160 sock = socket(AF_INET, SOCK_STREAM, 0); in main()
1163 sock = socket(AF_INET6, SOCK_STREAM, 0); in main()
1166 if(CURL_SOCKET_BAD == sock) { in main()
1173 if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, in main()
1188 rc = bind(sock, &me.sa, sizeof(me.sa4)); in main()
1196 rc = bind(sock, &me.sa, sizeof(me.sa6)); in main()
1220 if(getsockname(sock, &localaddr.sa, &la_size) < 0) { in main()
1224 sclose(sock); in main()
1245 sclose(sock); in main()
1252 rc = listen(sock, 5); in main()
1276 msgsock = accept(sock, NULL, NULL); in main()
1374 if((msgsock != sock) && (msgsock != CURL_SOCKET_BAD)) in main()
1377 if(sock != CURL_SOCKET_BAD) in main()
1378 sclose(sock); in main()