i have two mircs open, in the first one i put this:
on *:socklisten:dg:{ sockaccept dg1 | sockclose dg }
on *:sockread:dg1:{
while ($sock(dg1).rq) {
sockread &var
bwrite f.txt -1 &var
}
}
and in the second i put this:
on *:sockopen:dg:{
if ($sockerr) halt
var %a = 0,%b = 8192
while (%b <= $file(versions.txt).size) {
bread versions.txt %a %b &f
sockwrite dg &f
inc %a 8192 | inc %b 8192
}
sockwrite dg &f
sockclose dg
}
so the script should listen in the first mirc (/socklisten dg 78) and connect from the second (//sockopen dg $ip 78), after it connects it sends a file from the second mirc to the first mirc
the problem is that it doesn't send the whole file, the size of versions.txt is 42740 bytes and what i get to f.txt is only 32768 bytes
what's the problem??