Discussion:
How to Ping one URL with the fast speed under win98+IE5?????
(too old to reply)
Steve Wang
2003-08-05 00:42:34 UTC
Permalink
How to Ping one URL with the fast speed under win98+IE5?????

actually i have been use the below code,but the speed is very very slow,how
can i accelerate?




long PingOneServer(const char *SN)
{ //SN=Server Name(URL)

HINTERNET hInet,hUrl;
hInet=InternetOpen(AppName,INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
if (hInet==NULL) return 0;

//Flags=INTERNET_FLAG_KEEP_CONNECTION|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_
FLAG_RELOAD;
hUrl=InternetOpenUrl
(hInet,SN,NULL,0,INTERNET_FLAG_KEEP_CONNECTION|INTERNET_FLAG_NO_CACHE_WRITE|
INTERNET_FLAG_RELOAD,0);
if (hUrl==NULL) return 0;
InternetCloseHandle(hInet);
return 1;
}
Robert Zanatta
2003-08-08 00:34:32 UTC
Permalink
Use the Icmp functions, such as IcmpSendEcho()? They're in ICMP.DLL.
Post by Steve Wang
How to Ping one URL with the fast speed under win98+IE5?????
actually i have been use the below code,but the speed is very very slow,how
can i accelerate?
long PingOneServer(const char *SN)
{ //SN=Server Name(URL)
HINTERNET hInet,hUrl;
hInet=InternetOpen(AppName,INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
if (hInet==NULL) return 0;
//Flags=INTERNET_FLAG_KEEP_CONNECTION|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_
Post by Steve Wang
FLAG_RELOAD;
hUrl=InternetOpenUrl
(hInet,SN,NULL,0,INTERNET_FLAG_KEEP_CONNECTION|INTERNET_FLAG_NO_CACHE_WRITE|
Post by Steve Wang
INTERNET_FLAG_RELOAD,0);
if (hUrl==NULL) return 0;
InternetCloseHandle(hInet);
return 1;
}
Loading...