mIRC Homepage
Posted By: Asterix_UO Slow /bwrite - 26/05/08 12:54 PM
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
Posted By: Khaled Re: Slow /bwrite - 10/06/08 05:12 PM
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?
Posted By: argv0 Re: Slow /bwrite - 10/06/08 10:24 PM
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.
© mIRC Discussion Forums