|
-
Jan 10th, 2001, 06:23 AM
#1
Thread Starter
New Member
I everybody,
I need to transfer files between a client and a server via the winsock control.
I've already developped my own application which is running fine. The only problem is the transfer speed (20 sec. for 1 Mb!!!).
Does anybody encounter such a problem??
Thanks by advance.
_________________________________
JIEF
-
Jan 10th, 2001, 07:02 AM
#2
Retired VBF Adm1nistrator
Well, how are you sending the data ?
In chunks ?
- jamie.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 10th, 2001, 07:18 AM
#3
Thread Starter
New Member
Yes,
I used chunks of different sizes (2048 -> 8192 bytes) without any change.
Any idea?
_________________________________
JIEF
-
Jan 10th, 2001, 07:57 AM
#4
Retired VBF Adm1nistrator
Try the following ;
Code:
filenum = FreeFile
Open "filename.txt" For Binary As #filenum
Do While (Loc(filenum) < LOF(filenum))
DoEvents
var_data = Input(4096, #filenum)
Winsock1.SendData var_data
Loop
Also, it depends on what sort of connection the data is going over. If you're dialing up to the net over a modem, then 1 meg in 20seconds is good. However if its a network ...
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 11th, 2001, 01:50 AM
#5
Thread Starter
New Member
Many thanks!!!
I didn't use the "DoEvents" function and it has a terrific effect!! (time transfer is now <5 sec.)
kind regards
_________________________________
JIEF
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|