mIRC Home    About    Download    Register    News    Help

Print Thread
#200039 26/05/08 12:54 PM
Joined: May 2006
Posts: 27
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 27
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
Asterix_UO #200726 10/06/08 05:12 PM
Joined: Dec 2002
Posts: 5,421
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,421
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?

Asterix_UO #200735 10/06/08 10:24 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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"

Link Copied to Clipboard