由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - WebClient for multi-connections?
相关主题
HttpWebRequest小程序how to let button response 'return' key?
WebClient is not thread-safe!求助:关于online editor。
请问如何得到当前windows系统的序列号?.net web pge performance
问个c#的抓数据方面的问题 Quick Question
webclient从yahoo finance读取页面的问题 Threading Question
.Net Thread questioneasy question, but ...
c# 内存管理的一个小问题Thread suspend and resume
HELP customize context menuIs there WinThread in C#
相关话题的讨论汇总
话题: webclient话题: use话题: multi话题: however
进入DotNet版参与讨论
1 (共1页)
G**T
发帖数: 388
1
how to use WebClient for multi-connections for one server?
I'm trying to use WebClient to download files from a server. I use
multi-thread, each thread for one file. However, I find that I can only use at
most 2 threads. If I use > 2 threads at the same time, then WebClient will
have some exceptions. I tried to download > 2 files from IE6. It seems we can
only download 2 files at the same by using IE6. The third file won't begin to
be downloaded before one of the first two finished. However, if
j***e
发帖数: 186
2
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
add
"MaxConnectionsPer1_0Server"=Dword:00000010
"MaxConnectionsPerServer"=Dword:00000010
for 16 connections

【在 G**T 的大作中提到】
: how to use WebClient for multi-connections for one server?
: I'm trying to use WebClient to download files from a server. I use
: multi-thread, each thread for one file. However, I find that I can only use at
: most 2 threads. If I use > 2 threads at the same time, then WebClient will
: have some exceptions. I tried to download > 2 files from IE6. It seems we can
: only download 2 files at the same by using IE6. The third file won't begin to
: be downloaded before one of the first two finished. However, if

G**T
发帖数: 388
3

Settings
a quick check, it works for IE! so, I assume it will work for Vb .NET.
thanks.
I posted this question on www.vbforums.com
no1 can answer. hehe
use at
can
to
Opera,
this
webpages
the

【在 j***e 的大作中提到】
: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
: add
: "MaxConnectionsPer1_0Server"=Dword:00000010
: "MaxConnectionsPerServer"=Dword:00000010
: for 16 connections

G**T
发帖数: 388
4

Settings
however, it still does not work in Vb .NET program although it works for IE.
how can I make WebClient can have more connections?
thx
use at
can
to
Opera,
this
webpages
the

【在 j***e 的大作中提到】
: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
: add
: "MaxConnectionsPer1_0Server"=Dword:00000010
: "MaxConnectionsPerServer"=Dword:00000010
: for 16 connections

st
发帖数: 1685
5
ie was based on inetinfo, I think webclient is based on inetinfo as well,
not sure if it has something you can customize...

【在 G**T 的大作中提到】
:
: Settings
: however, it still does not work in Vb .NET program although it works for IE.
: how can I make WebClient can have more connections?
: thx
: use at
: can
: to
: Opera,
: this

j***e
发帖数: 186
6
Why not try HttpWebResponse ? Maybe it can have more connections.
And it is superior than WebClient. You can check encoding, content type
blah blah.

【在 G**T 的大作中提到】
:
: Settings
: however, it still does not work in Vb .NET program although it works for IE.
: how can I make WebClient can have more connections?
: thx
: use at
: can
: to
: Opera,
: this

st
发帖数: 1685
7
I guess WebClient is just so easy to use... for basic tasks..

【在 j***e 的大作中提到】
: Why not try HttpWebResponse ? Maybe it can have more connections.
: And it is superior than WebClient. You can check encoding, content type
: blah blah.

G**T
发帖数: 388
8

same thing.
IE.

【在 j***e 的大作中提到】
: Why not try HttpWebResponse ? Maybe it can have more connections.
: And it is superior than WebClient. You can check encoding, content type
: blah blah.

G**T
发帖数: 388
9

i tried httpwebquest ...., same thing. can not change # of connections
maybe I'm wrong.
IE.

【在 st 的大作中提到】
: I guess WebClient is just so easy to use... for basic tasks..
R*********t
发帖数: 217
10
check the document for ServicePointManager, but be aware of the
consequences of multiple connections to a single server.

【在 G**T 的大作中提到】
:
: i tried httpwebquest ...., same thing. can not change # of connections
: maybe I'm wrong.
: IE.

G**T
发帖数: 388
11

yes, ServicePoint is the way to do it. However, it seems no1 recommends to use
it to change connection #.
so I gave up.
IE.

【在 R*********t 的大作中提到】
: check the document for ServicePointManager, but be aware of the
: consequences of multiple connections to a single server.

1 (共1页)
进入DotNet版参与讨论
相关主题
Is there WinThread in C#webclient从yahoo finance读取页面的问题
如何在C#环境下启动一个新的进程.Net Thread question
如何同步多个程序同时读取一个文件c# 内存管理的一个小问题
7 free ebooksHELP customize context menu
HttpWebRequest小程序how to let button response 'return' key?
WebClient is not thread-safe!求助:关于online editor。
请问如何得到当前windows系统的序列号?.net web pge performance
问个c#的抓数据方面的问题 Quick Question
相关话题的讨论汇总
话题: webclient话题: use话题: multi话题: however