Hi guys
I think i've found 2 bugs in the /sockread command with &binvar:
if you try to sockread -n &binvar
it supposed to read all lines separated by $crlf
okay but sometimes, there are no $crlf and you can see the on *:sockread event is calling but $sockbr is always $null.After, never appends, you can type /socklist, the socket is still open (maybe it's false, and mirc lie to me xD)
I've been waiting one day long and the socket is still open. i've changed the code by adding a "sockwrite -n &a" after the while ($sockbr) and i've received the remaining datas one day after the website send it to me!!!
here the code:

Code:
  
alias testbug {
  sockclose tb
  sockopen tb tvunderground.org.ru 80
}
on *:sockopen:tb:{
  sockwrite -n $sockname GET /index.php HTTP/1.0
  sockwrite -n $sockname $crlf
}
on *:sockread:tb:{
  if $sockerr { echo -s planté | return }
  sockread -n &a
  while $sockbr {
    echo -s < on a lu $bvar(&a,1,100).text
    sockread -n &a
  }
}



one other bug i've found (i think it's a bug)
in the help file, i can see "The -n switch allows you to read a $crlf terminated line into a &binvar. If the incoming line does not contain a $crlf, no bytes will be read into &binvar, unless you specify the -f switch, which forces the read (same as when reading into %vars)."

so it mean that if i write sockread -nf &binvar it supposed to parse datas as sockread %var does?
yeah, it's just supposed, because it send more than one line in the same time:
sockread -nf &binvar is exactly the same thing as sockread &binvar


note: i'm using mirc 6.17 and windows XP sp2