Originally Posted By: jaytea
at the high level that is mircscript, yes, the code has to stop (the end of the sockread event must be reached) before mirc retriggers on *:sockread and gives you a new batch of data to handle

Quote:

$sockerr

$sockerr is set to a value after each socket command/event and must be checked after each socket command and before processing an event to see if an error occurred.

that line should better be wiped from the help then, it's not true and in contradiction with the help example
Code:
on 1:sockread:testing:{
 if ($sockerr > 0) return
 :nextread
 sockread %temp
 if ($sockbr == 0) return
 if (%temp == $null) %temp = -
 echo 4 %temp
 goto nextread
}

... where it also does not check after /sockread

The $sockerr help line causes people to wrongly think $sockerr can change after each socket command, the word 'must' is even in bold.
It's also contradictional with the /sockwrite help:
Quote:

On error: if a /sockwrite fails, it sets $sock().wserr to the error value, and triggers the on sockwrite event with $sockerr set.