mIRC Home    About    Download    Register    News    Help

Print Thread
Slow /bwrite #200039
26/05/08 12:54 PM
26/05/08 12:54 PM
Joined: May 2006
Posts: 27
Brasil
A
Asterix_UO Offline OP
Ameglian cow
Asterix_UO  Offline OP
Ameglian cow
A

Joined: May 2006
Posts: 27
Brasil
I was making a download manager and the sockread when the file pass 800kb the mirc stay slow...

Code:
alias download { sockclose down | sockopen down imgcdn.pandora.tv 80 }
on *:sockopen:down:{ if (!$sockerr) { sockwrite -n down GET http://imgcdn.pandora.tv/pan_img/KMP/Download/kmp.exe HTTP/1.1 | sockwrite -n down } }
on *:sockread:down:{ if (!$sockerr) { sockread &down | bwrite kmp.exe -1 -1 &down } }


what is can be? tks

sorry for my english laugh


Suchorski @ FreeNode
Re: Slow /bwrite [Re: Asterix_UO] #200726
10/06/08 05:12 PM
10/06/08 05:12 PM
Joined: Dec 2002
Posts: 4,449
London, UK
Khaled Offline

Hoopy frood
Khaled  Offline

Hoopy frood

Joined: Dec 2002
Posts: 4,449
London, UK
The only reason I can think of is that your anti-virus software is rescanning the executable file every time it changes. If you save the file with a different extension does that resolve the issue for you?

Re: Slow /bwrite [Re: Asterix_UO] #200735
10/06/08 10:24 PM
10/06/08 10:24 PM
Joined: Oct 2003
Posts: 3,918
Montreal, QC, Canada
A
argv0 Offline
Hoopy frood
argv0  Offline
Hoopy frood
A

Joined: Oct 2003
Posts: 3,918
Montreal, QC, Canada
On a sidenote you should realize that the script you posted will corrupt the file as it downloads if you use the HTTP/1.1 protocol. The 1.1 protocol sends the <bytesleft> value in the stream every (few) packet(s) and unless you ignore it you'll likely /bwrite invalid data. Either handle the bytesleft value or use the HTTP/1.0 protocol in your GET request.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"