If you read the help file a bit more thoroughly, you'll read two things:

1) ON SOCKREAD will trigger every time something new comes into that socket, or something remains in the socket's queue, and will re-trigger if there is still things to read.

2) A /sockread command will read into a non-binary variable up until the next carriage-return/line-feed/crlf. You can also see if there's more to read by checking the $sockbr identifier's state.

Take these two together, and you can make some assumptions:

- Let ON SOCKREAD trigger many times, reading from the socket one line at a time.

- Set up a loop of some kind (while/goto) and read until $sockbr is no longer 0.

Now, the code as it stands reads one line, then closes the socket, forcing mIRC to discard the remaining data in the socket connection.

Don't close the socket in your ON SOCKREAD, leave it until an ON SOCKCLOSE event is triggered, or set up a timer and make your own connection timeout.

What does this all translate to?

Code:
ON *:SOCKREAD:bsocket: {
  var %bash
  while ($sockbr != 0) {
    sockread $sockname %bash
    <manipulate the data here>
  }
}
ON *:SOCKCLOSE:bsocket: {
  sockclose $sockname
}


.. Roughly ..