I ran into this myself recently. I was getting cut off at 8192 bytes. Basically, SocketReadAvail() returns 8192 as a max even if there's more coming.
The code isn't on this machine, but from memory, the fix was to change "if SocketReadAvail(socket)" into "while SocketReadAvail(socket) > 0", and keep appending to the destination string.
The code isn't on this machine, but from memory, the fix was to change "if SocketReadAvail(socket)" into "while SocketReadAvail(socket) > 0", and keep appending to the destination string.