Skip to content

Commit 8631dbd

Browse files
committed
merge upstream
1 parent 97a6515 commit 8631dbd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

c/socket/windows/request.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ typedef void Fun(char *, int);
88

99
#define MAXLINE 100
1010
#define MAXRECV 0xfff
11-
#define PROXY_IP "192.168.10.1"
12-
#define PROXY_PORT 1088
11+
#define PROXY_IP "127.0.0.1"
12+
#define PROXY_PORT 7890
1313
#define PROXY_FLAG 1
1414

1515
FILE *fp = NULL;
@@ -120,7 +120,7 @@ void check_type(const char *url, char *type, char *filename, int nameflag)
120120
dowm_flag = 1;
121121
}
122122

123-
void request(const char *sUrl, Fun *fun)
123+
int request(const char *sUrl, Fun *fun)
124124
{
125125
struct sockaddr_in servaddr;
126126
clock_t start, end;
@@ -227,7 +227,7 @@ void request(const char *sUrl, Fun *fun)
227227
closesocket(sockfd);
228228
WSACleanup();
229229

230-
return;
230+
return status;
231231
}
232232

233233
// Example callback function
@@ -271,6 +271,7 @@ int main(int argc, char *argv[])
271271
https_to_http(argv);
272272
printf("\n");
273273
start = clock();
274+
// while (request(argv[1], process_data)!=200);
274275
request(argv[1], process_data);
275276
// request(url, process_data);
276277
end = clock();

0 commit comments

Comments
 (0)