Lines Matching defs:sock
275 void GeoIP_send_request_uri(const int sock, const char *request_uri) {
277 send(sock, request_uri, strlen(request_uri),0);
279 send(sock,GeoIPProxyCreds,strlen(GeoIPProxyCreds),0);
281 send(sock, "\r\n", 2 ,0);
286 int sock;
333 if((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
348 if (connect(sock, (struct sockaddr *)&sa, sizeof(struct sockaddr))< 0)
357 GeoIP_send_request_uri(sock, request_uri);
369 amt = recv(sock, &buf[offset], block_size,0);
546 int sock;
583 if((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
597 if (connect(sock, (struct sockaddr *)&sa, sizeof(struct sockaddr))< 0)
611 GeoIP_send_request_uri(sock, request_uri);
620 amt = recv(sock, &buf[offset], block_size,0);
676 if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
690 if (connect(sock, (struct sockaddr *)&sa, sizeof(struct sockaddr))< 0) {
705 GeoIP_send_request_uri(sock, request_uri);
719 amt = recv(sock, &buf[offset], block_size,0);
745 close(sock);
765 if((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
772 if (connect(sock, (struct sockaddr *)&sa, sizeof(struct sockaddr))< 0)
779 GeoIP_send_request_uri(sock, request_uri);
796 amt = recv(sock, &buf[offset], block_size,0);