INFO: WinInet Limits Connections Per Server
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Internet Explorer (Programming) versions 4.0, 4.01, 5, 5.5
--------------------------------------------------------------------------------
SUMMARY
WinInet will limit the number of simultaneous connections that it will make to a single HTTP server. If you exceed this limit the requests will block until one of the current connections has completed. This is by design and is in agreement with the HTTP specification and industry standards.
MORE INFORMATION
WinInet will limit connections to a single HTTP 1.0 server to four simultaneous connections. Connections to a single HTTP 1.1 server will be limited to two simultaneous connections. The HTTP 1.1 specification (RFC2068) mandates the two connection limit while the four connection limit for HTTP 1.0 is a self-imposed restriction which coincides with the standard used by a number of popular Web browsers.
The only evidence of this limitation to your application will be that calls like HttpSendRequest and InternetOpenURL will simply appear to take longer to complete as they wait for previous connections to be freed up before their requests are sent.
You can configure WinInet to exceed this limit by creating and setting the registry entries below
NOTE: By changing these settings you are causing WinInet to break the HTTP protocol specification for your application and any other WinInet applications running on your machine, including Internet Explorer. You should only do this if absolutely necessary and then you should avoid doing standard Web browsing while these settings are in effect:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
MaxConnectionsPerServer REG_DWORD (Default 2)
Sets the number of simultaneous requests to a single HTTP 1.1 Server
MaxConnectionsPer1_0Server REG_DWORD (Default 4)
Sets the number of simultaneous requests to a single HTTP 1.0 Server
These settings are made for a particular user and will have no affect on other users who log onto the machine.
In Internet Explorer 5, it is possible to change the connection limit programmatically by calling the InternetSetOption API on NULL handle with the following flags (note that it will change connection limit for the entire process):
INTERNET_OPTION_MAX_CONNS_PER_SERVER INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER
Additional query words: kbwininet multiple instance
Keywords : kbIE400 kbIE401 kbWinInet kbGrpInet kbIE500 kbIE550
Issue type : kbinfo
Technology :
댓글 없음:
댓글 쓰기