You can't just loop through it like that because you're not giving it time to be sent. You should use the on sockwrite event to know when to send each new chunk. Even then you should check $sock($sockname).sq + the length of data you're sending doesn't exceed 16384 bytes, otherwise wait until the next sockwrite event.


Spelling mistakes, grammatical errors, and stupid comments are intentional.