Very nice code indeed. Never thought to use the sockmark in that fashion. I usually use for when reading huge files for some reason or another, I don't recall right off hand.
Couple of quick notes:
sockwrite -n atest Host: www.mirc.co.uk
Host is not a valid request header in HTTP 1.0. It will most likely just be ignored and as such is not needed in this request. It was added in HTTP 1.1 for name based virtual hosting.
sockwrite atest $str($crlf,2)
Really unneeded. You already have a newline added after the previous line (the -n switch). Easier just to add a blank sockwrite line: